sw/source/core/layout/ftnfrm.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 0038a2df911d807a47f7891ab47d19af0a9ed544 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Feb 18 20:00:19 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Feb 18 22:12:51 2022 +0100 cid#1500272 silence Dereference after null check before: commit 24caeee8236576abd92086974c1dbbf15b81a4c5 Date: Sun Dec 8 17:33:53 2019 +0000 Refactor a bit of the footnote handling code the IsFootnoteContFrame() was assume to be always true, return to that state but assert rather than OSL_ENSURE Change-Id: Ia8ca179814b08e3c415ea74ada8a063b75a2557a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130175 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index ce7bc0b7c073..a01c0c8bc4f0 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2800,8 +2800,9 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO // it into the container. // Create also a SectionFrame if currently in an area inside a footnote. SwFootnoteFrame* pTmpFootnote = pNewUpper->IsFootnoteFrame() ? static_cast<SwFootnoteFrame*>(pNewUpper) : nullptr; - if (!pTmpFootnote && pNewUpper->IsFootnoteContFrame()) + if (!pTmpFootnote) { + assert(pNewUpper->IsFootnoteContFrame() && "New Upper not a FootnoteCont"); SwFootnoteContFrame *pCont = static_cast<SwFootnoteContFrame*>(pNewUpper); pTmpFootnote = SwFootnoteContFrame::AppendChained(this, true); SwFrame* pNx = pCont->Lower();