summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/flowfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/flowfrm.cxx')
-rw-r--r--sw/source/core/layout/flowfrm.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index d53622754d69..90123ceadc0e 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1872,6 +1872,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
}
}
+ std::unique_ptr<SwFrameDeleteGuard> xDeleteGuard(bMakePage ? new SwFrameDeleteGuard(pOldBoss) : nullptr);
+
bool bSamePage = true;
SwLayoutFrame *pNewUpper =
m_rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true );
@@ -1910,6 +1912,8 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
pOldBoss = pOldBoss->FindFootnoteBossFrame( true );
SwPageFrame* pNewPage = pOldPage;
+ xDeleteGuard.reset();
+
// First, we move the footnotes.
bool bFootnoteMoved = false;