diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-19 14:17:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-05-20 12:38:47 +0200 |
commit | 68da277559597c52833067c1749323ac38f3364a (patch) | |
tree | 426242ad324963d97f35793a1f9a12b5e39062be /sw | |
parent | 36efd0e460d4916d3bc15df2df8d382b6609d6be (diff) |
sw: fix crash in SwHeaderFooterWin::IsEmptyHeaderFooter()
Crashreport signature:
Fatal signal received: SIGSEGV code: 1 for address: 0x0
program/../program/libswlo.so
SwPageFrame::GetPageDesc() const
sw/source/core/inc/pagefrm.hxx:144
program/../program/libswlo.so
SwHeaderFooterWin::IsEmptyHeaderFooter() const
sw/source/uibase/docvw/HeaderFooterWin.cxx:403
program/../program/libswlo.so
SwHeaderFooterWin::ShowAll(bool)
sw/source/uibase/docvw/HeaderFooterWin.cxx:273
program/../program/libswlo.so
SwFrameControl::ShowAll(bool)
sw/source/uibase/inc/FrameControl.hxx:49
Change-Id: I3c1a6f46c7a15c2ca1a3db69a14d49abbea8c879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134656
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/HeaderFooterWin.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index 9a40c0fecd84..24f41021e832 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -399,6 +399,11 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const { bool bResult = true; + if (!GetPageFrame()) + { + return bResult; + } + // Actually check it const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc(); |