sw/source/core/layout/sectfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit f4dc18b42e9aeada0f54d0efb63972283fac1f40 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Nov 2 14:23:34 2024 +0500 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sat Nov 2 14:54:44 2024 +0100 Fix unchecked dereference After commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1 ("tdf#159565 prerequisite: make hidden sections have zero-height frames", 2024-02-15). Change-Id: Ie990dcaf519329382b5088f31e6f534445470229 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175944 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 35dbbcefb2a31c211a879eb7d5cdd267dd763ccc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175916 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index a7dbf0e02be5..24618fc4df09 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2252,7 +2252,8 @@ bool SwSectionFrame::Growable() const SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst ) { - if (GetSection()->CalcHiddenFlag()) + SwSection* pSection = GetSection(); + if (pSection && pSection->CalcHiddenFlag()) { return 0; } @@ -2272,7 +2273,6 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst ) bool bGrow = !Lower() || !Lower()->IsColumnFrame() || !Lower()->GetNext(); if (!bGrow) { - SwSection* pSection = GetSection(); bGrow = pSection && pSection->GetFormat()->GetBalancedColumns().GetValue(); } if( !bGrow )