[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 20 10:20:23 UTC 2018
sw/source/core/layout/flowfrm.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit d1b9cbe749fc3329bda1e8ddaee6d8a6f783ad82
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 15:22:58 2018 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 20 12:20:03 2018 +0200
tdf#117086 crash on deleted SwFootnoteBossFrame
use SwFrameDeleteGuard to lock pOldBoss to exist over the range
its directly accessed
Change-Id: I68af80114a380f68b86cbc78278fb9e5e87cccce
Reviewed-on: https://gerrit.libreoffice.org/59113
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 46af46fbe942..4366c98af710 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1871,6 +1871,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 );
@@ -1909,6 +1911,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;
More information about the Libreoffice-commits
mailing list