summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-11-12 19:49:40 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2023-11-24 21:58:22 +0100
commit6d721bac67e5d43fb1aeaa73b8a9a554d98843e1 (patch)
tree8f744054d1360b775590d7ee0aa090be14a4240b
parentc1ed305aa98a6295dad4e3e57328d118521d38a9 (diff)
ofz#64106 Null-dereference READ
Change-Id: Ie279f9f54fa6cc7fcc6add9b737d2c5dc248a236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159349 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 9fc42afd17e9115b488401f64804479e7a76a300)
-rw-r--r--sw/source/uibase/uiview/viewport.cxx5
1 files 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 ||