summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/moduldlg.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 4d4df19704d9..6618253b3914 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -177,7 +177,9 @@ bool ExtTreeListBox::NotifyAcceptDrop( SvTreeListEntry* pEntry )
// don't drop in the same library
SvTreeListEntry* pSelected = FirstSelected();
- if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
+ if (!pSelected)
+ bValid = false;
+ else if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
bValid = false;
else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) )
bValid = false;