summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-04 10:30:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-04 11:11:01 +0000
commitf9c3d4e81d54b0e520e797cada2af32fa979c089 (patch)
tree707ed0fbccf119d1220f011ab7b6fbf8ed4629b2
parentdbf601891b2cc20adc9815771ad68dcc9635fa29 (diff)
coverity#1266469 Dereference null return value
Change-Id: I87318ba286ad2d8ded5d3e467b7a1e371318bef8
-rw-r--r--sw/source/uibase/shells/basesh.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 054bb02a079f..6de9bb702c5b 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1263,9 +1263,10 @@ IMPL_LINK_NOARG(SwBaseShell, GraphicArrivedHdl)
if( !bProtect )
{
sal_uInt16 nId = SvxContourDlgChildWindow::GetChildWindowId();
- SvxIMapDlg *pDlg = pVFrame->HasChildWindow( nId ) ?
- static_cast<SvxIMapDlg*>( pVFrame->GetChildWindow( nId )
- ->GetWindow()) : 0;
+ SfxChildWindow *pChildWindow = pVFrame->HasChildWindow(nId) ?
+ pVFrame->GetChildWindow(nId) : 0;
+ SvxIMapDlg *pDlg = pChildWindow ?
+ static_cast<SvxIMapDlg*>(pChildWindow->GetWindow()) : 0;
if( pDlg && pDlg->GetEditingObject() !=
rSh.GetIMapInventor() )
lcl_UpdateContourDlg( rSh, nsSelectionType::SEL_GRF );