summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-16 11:39:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-17 09:54:14 +0200
commit1a7f79d6ceab9871511758682efb677483437a87 (patch)
treefae8405362a1d8f1eced791cd7966090c4fc43b4
parent36e1834c9893deae9a45cd2026eb7d02e6a16bd9 (diff)
cid#1500532 Dereference before null check
Change-Id: I001b00f13913f89367257668300ddfa82d3c57d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138397 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/uiview/view.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 4e68b6e04bf0..b99baff1988f 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1052,7 +1052,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
if( !m_pVScrollbar->IsScrollbarVisible(true) )
ShowVScrollbar( false );
- if (m_pWrtShell && m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
+ if (m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
m_pWrtShell->InvalidateOutlineContentVisibility();
GetViewFrame()->GetWindow().AddChildEventListener( LINK( this, SwView, WindowChildEventListener ) );
@@ -1098,7 +1098,7 @@ SwView::~SwView()
GetViewFrame()->GetBindings().LEAVEREGISTRATIONS();
// the last view must end the text edit
- SdrView *pSdrView = m_pWrtShell ? m_pWrtShell->GetDrawView() : nullptr;
+ SdrView *pSdrView = m_pWrtShell->GetDrawView();
if( pSdrView && pSdrView->IsTextEdit() )
pSdrView->SdrEndTextEdit( true );
else if (pSdrView)