sw/source/uibase/docvw/HeaderFooterWin.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 620368baf0106083de526513b6c7f4c31876f2ed Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu May 19 14:17:10 2022 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Thu Nov 10 01:56:34 2022 +0100 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> (cherry picked from commit c60bbd7a90a9281b02496099759584109e931f2b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142453 Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/sw/source/uibase/docvw/HeaderFooterWin.cxx b/sw/source/uibase/docvw/HeaderFooterWin.cxx index f9a63c449a08..f6c37941869f 100644 --- a/sw/source/uibase/docvw/HeaderFooterWin.cxx +++ b/sw/source/uibase/docvw/HeaderFooterWin.cxx @@ -387,6 +387,11 @@ bool SwHeaderFooterWin::IsEmptyHeaderFooter( ) const { bool bResult = true; + if (!GetPageFrame()) + { + return bResult; + } + // Actually check it const SwPageDesc* pDesc = GetPageFrame()->GetPageDesc();