diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:42:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:42:50 +0000 |
commit | c8af68bc5adf093f9df803f6fe0147ac9d116169 (patch) | |
tree | 40570225bacb37c15c327329bd6d69020279fce5 /sd | |
parent | a79318470e63059309db4fe6ba92942cfac517a9 (diff) |
coverity#1265810 Dereference null return value
Change-Id: I3e99cfd189bae3ed37979dbbb69219b2649a9243
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index e1442cd4fefe..769e6466005e 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1329,8 +1329,11 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt ) SdNavigatorWin* pNavWin = NULL; sal_uInt16 nId = SID_NAVIGATOR; - if( mpFrame->HasChildWindow( nId ) ) - pNavWin = static_cast<SdNavigatorWin*>( mpFrame->GetChildWindow( nId )->GetContextWindow( SD_MOD() ) ); + if (mpFrame->HasChildWindow(nId)) + { + SfxChildWindow* pWnd = mpFrame->GetChildWindow(nId); + pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL; + } if( pNavWin && ( pNavWin == mpParent ) ) { |