sw/source/core/inc/ftnboss.hxx   |    1 +
 sw/source/core/layout/ftnfrm.cxx |    1 +
 2 files changed, 2 insertions(+)

New commits:
commit ac605821ecf3ea263d4812ebec352314a2dbff42
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 2 20:16:37 2022 +0000
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Mar 3 08:54:41 2022 +0100

    add a SwFrameDeleteGuard to SwSaveFootnoteHeight
    
    Change-Id: Ic4f0bb7c26cc021119b09682075a05d5207b48a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130897
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index 3ee7859bf8f3..e60ff97de1a9 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -31,6 +31,7 @@ class SwTextFootnote;
 // Restoration of the old value in DTor. Implementation in ftnfrm.cxx
 class SwSaveFootnoteHeight
 {
+    SwFrameDeleteGuard aGuard;
     SwFootnoteBossFrame *pBoss;
     const SwTwips nOldHeight;
     SwTwips nNewHeight;
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index a01c0c8bc4f0..2b0b5458c383 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2866,6 +2866,7 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, 
SwFootnoteBossFrame *pO
 }
 
 SwSaveFootnoteHeight::SwSaveFootnoteHeight( SwFootnoteBossFrame *pBs, const 
SwTwips nDeadLine ) :
+    aGuard(pBs),
     pBoss( pBs ),
     nOldHeight( pBs->GetMaxFootnoteHeight() )
 {

Reply via email to