sw/source/uibase/uiview/view.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 1a7f79d6ceab9871511758682efb677483437a87 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Aug 16 11:39:43 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 17 09:54:14 2022 +0200 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 <caol...@redhat.com> 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)