sw/source/uibase/docvw/HeaderFooterWin.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit c60bbd7a90a9281b02496099759584109e931f2b Author: Miklos Vajna <[email protected]> AuthorDate: Thu May 19 14:17:10 2022 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Thu May 19 16:45:15 2022 +0200 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/+/134640 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> 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();
