diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-11-12 19:49:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-11-13 11:04:07 +0100 |
commit | 9fc42afd17e9115b488401f64804479e7a76a300 (patch) | |
tree | 7153ec9aecbaad3c7f3007d06ad24a9b713d3c02 /sw | |
parent | 333070dd1ca45e1966f312ba78dbc5985ab814d7 (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>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index b66bbadab3bf..08d9b0c39338 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -315,8 +315,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 || |