From 98e9ac947d5150c0f4272ac0da7f3de35937d1f8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 24 Jan 2015 14:47:52 +0000 Subject: coverity#1265803 Dereference null return value Change-Id: I4e565d9b5a416e7f4f435c75a715dad09c4e7e26 --- sd/source/ui/dlg/sdtreelb.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sd') 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( mpFrame->GetChildWindow( SID_NAVIGATOR )->GetContextWindow( SD_MOD() ) ); - - if( mpDropNavWin == pNewNavWin) + SfxChildWindow* pWnd = mpFrame->GetChildWindow(SID_NAVIGATOR); + SdNavigatorWin* pNewNavWin = pWnd ? static_cast(pWnd->GetContextWindow(SD_MOD())) : NULL; + if (mpDropNavWin == pNewNavWin) { MouseEvent aMEvt( mpDropNavWin->GetPointerPosPixel() ); SvTreeListBox::MouseButtonUp( aMEvt ); -- cgit