diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-05-19 14:17:10 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-20 15:43:49 +0200 |
commit | 24d8300c1b5a44c4b30c1e062b449df8507d80dc (patch) | |
tree | d8a6bf8b91cab052edb7e01b9d02fc10fbefa720 | |
parent | 47b0a2935bf1b73647326cb1748b48cb0aeeeaa6 (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>
(cherry picked from commit 68da277559597c52833067c1749323ac38f3364a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134622
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-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 d74c25084f14..99cdc0072861 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(); |