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

New commits:
commit c838925bb414f94a63abc0fa0073c5cd71a7972d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 2 20:16:37 2022 +0000
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Mar 3 17:15:31 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>
    (cherry picked from commit ac605821ecf3ea263d4812ebec352314a2dbff42)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130852
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

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 ce7bc0b7c073..1a11bbb5dfdf 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2865,6 +2865,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