diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-14 15:22:58 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-08-05 14:28:51 +0200 |
commit | 3bc1879990a381879dc249f3cb7cce3671d0fe7a (patch) | |
tree | 3adefd33c96be98c7f67a6449970f2bc945d0439 | |
parent | ofz#9934 null deref (diff) | |
download | core-3bc1879990a381879dc249f3cb7cce3671d0fe7a.tar.gz core-3bc1879990a381879dc249f3cb7cce3671d0fe7a.zip |
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@cib.de>
(cherry picked from commit d1b9cbe749fc3329bda1e8ddaee6d8a6f783ad82)
-rw-r--r-- | sw/source/core/layout/flowfrm.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 6d4ffb471853..ca28f9eb78d2 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -1850,6 +1850,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 ); @@ -1888,6 +1890,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; |