From 6d721bac67e5d43fb1aeaa73b8a9a554d98843e1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 12 Nov 2023 19:49:40 +0000 Subject: ofz#64106 Null-dereference READ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie279f9f54fa6cc7fcc6add9b737d2c5dc248a236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159349 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 9fc42afd17e9115b488401f64804479e7a76a300) --- sw/source/uibase/uiview/viewport.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 2fa7e12f5afe..fb40aa453798 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -323,8 +323,9 @@ void SwView::SetVisArea( const Point &rPt, bool bUpdateScrollbar ) void SwView::CheckVisArea() { - m_pHScrollbar->SetAuto( m_pWrtShell->GetViewOptions()->getBrowseMode() && - !GetViewFrame()->GetFrame().IsInPlace() ); + if (m_pHScrollbar) + m_pHScrollbar->SetAuto( m_pWrtShell->GetViewOptions()->getBrowseMode() && + !GetViewFrame()->GetFrame().IsInPlace() ); if ( IsDocumentBorder() ) { if ( m_aVisArea.Left() != DOCUMENTBORDER || -- cgit