diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:47:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:47:52 +0000 |
commit | 98e9ac947d5150c0f4272ac0da7f3de35937d1f8 (patch) | |
tree | adb23deadf47bbb5e27fe478c7e17668ad1153e1 /sd | |
parent | 66b6f8f77db9d0497ff67d11f102f4160aefa7de (diff) |
coverity#1265803 Dereference null return value
Change-Id: I4e565d9b5a416e7f4f435c75a715dad09c4e7e26
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sdtreelb.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 213c4c4d3981..7fbe70014ea8 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1262,9 +1262,9 @@ void SdPageObjsTLB::OnDragFinished( sal_uInt8 ) { if( mpFrame->HasChildWindow( SID_NAVIGATOR ) ) { - SdNavigatorWin* pNewNavWin = static_cast<SdNavigatorWin*>( mpFrame->GetChildWindow( SID_NAVIGATOR )->GetContextWindow( SD_MOD() ) ); - - if( mpDropNavWin == pNewNavWin) + SfxChildWindow* pWnd = mpFrame->GetChildWindow(SID_NAVIGATOR); + SdNavigatorWin* pNewNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL; + if (mpDropNavWin == pNewNavWin) { MouseEvent aMEvt( mpDropNavWin->GetPointerPosPixel() ); SvTreeListBox::MouseButtonUp( aMEvt ); |