add a SwFrameDeleteGuard to SwSaveFootnoteHeight

Change-Id: Ic4f0bb7c26cc021119b09682075a05d5207b48a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130897
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Caolán McNamara 2022-03-02 20:16:37 +00:00 committed by Stephan Bergmann
parent c35a59ae2e
commit ac605821ec
2 changed files with 2 additions and 0 deletions

View file

@ -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;

View file

@ -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() )
{