summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/source/ui/view/sdview2.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index a5b3d44132b6..17449a6b8a86 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -437,7 +437,9 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( nLayer != SDRLAYER_NOTFOUND )
{
SdrLayerAdmin& rLayerAdmin = mrDoc.GetLayerAdmin();
- aLayerName = rLayerAdmin.GetLayerPerID(nLayer)->GetName();
+ SdrLayer* pLayer = rLayerAdmin.GetLayerPerID(nLayer);
+ assert(pLayer && "layer missing");
+ aLayerName = pLayer->GetName();
}
if( mbIsDropAllowed && !pPV->IsLayerLocked( aLayerName ) && pPV->IsLayerVisible( aLayerName ) )