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

New commits:
commit e16281915ef61b657d60d9200abbe365dfc8acad
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Mar 2 20:16:37 2022 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Mar 4 12:37:22 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 <[email protected]>
    (cherry picked from commit ac605821ecf3ea263d4812ebec352314a2dbff42)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130855
    Reviewed-by: Michael Stahl <[email protected]>

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 d65d7c70d546..3178fd50b9db 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2863,6 +2863,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