summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/view2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-26 10:43:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-26 12:14:41 +0000
commit10d728b63fe3c9885f54c4c6576fa798294533b0 (patch)
tree3f0ec5fb103ad3bd858db1954fee540885dde4cc /sw/source/uibase/uiview/view2.cxx
parent6ede99c8ed7b1e4546ddfbac6f1cdb4cba34d7e5 (diff)
coverity#1266468 Dereference null return value
Change-Id: I5ea0e972eeb585870f309e7e73ba4b1ece5dfa6a
Diffstat (limited to 'sw/source/uibase/uiview/view2.cxx')
-rw-r--r--sw/source/uibase/uiview/view2.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index f74f21728761..40925db3e5c0 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1072,8 +1072,11 @@ void SwView::Execute(SfxRequest &rReq)
pVFrame->ToggleChildWindow( SID_NAVIGATOR );
pCh = pVFrame->GetChildWindow( SID_NAVIGATOR );
}
- static_cast<SwNavigationPI*>( pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool(
- GetVisArea(), true, &pVFrame->GetWindow());
+ if (pCh)
+ {
+ static_cast<SwNavigationPI*>( pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool(
+ GetVisArea(), true, &pVFrame->GetWindow());
+ }
}
break;
case SID_JUMPTOMARK: