diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:46:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 14:46:42 +0000 |
commit | 66b6f8f77db9d0497ff67d11f102f4160aefa7de (patch) | |
tree | 942d35a2db85c58d25a2075b4ffc5e0fa6f8f5fa /sd | |
parent | 3088788c6d122d1e2cfec04c33d4d084a019e782 (diff) |
coverity#1265806 Dereference null return value
Change-Id: Iaf8d1f570b6f343d841327c379d5424ea64cda31
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 769e6466005e..213c4c4d3981 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -1120,8 +1120,11 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel) SdNavigatorWin* pNavWin = NULL; SvTreeListEntry* pEntry = GetEntry(rPosPixel); - if( mpFrame->HasChildWindow( SID_NAVIGATOR ) ) - pNavWin = static_cast<SdNavigatorWin*>( mpFrame->GetChildWindow( SID_NAVIGATOR )->GetContextWindow( SD_MOD() ) ); + if (mpFrame->HasChildWindow(SID_NAVIGATOR)) + { + SfxChildWindow* pWnd = mpFrame->GetChildWindow(SID_NAVIGATOR); + pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL; + } if (pEntry != NULL && pNavWin !=NULL |