[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 15 13:46:24 UTC 2018


 sw/source/core/layout/flowfrm.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit e4989ae8ca0d8b37e98caa5b68c164c79d27d574
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 14 15:22:58 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 15 15:46:00 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/58991
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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;
 


More information about the Libreoffice-commits mailing list