From 10d728b63fe3c9885f54c4c6576fa798294533b0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 26 Jan 2015 10:43:47 +0000 Subject: coverity#1266468 Dereference null return value Change-Id: I5ea0e972eeb585870f309e7e73ba4b1ece5dfa6a --- sw/source/uibase/uiview/view2.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sw/source/uibase/uiview/view2.cxx') 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( pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool( - GetVisArea(), true, &pVFrame->GetWindow()); + if (pCh) + { + static_cast( pCh->GetContextWindow(SW_MOD()))->CreateNavigationTool( + GetVisArea(), true, &pVFrame->GetWindow()); + } } break; case SID_JUMPTOMARK: -- cgit