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

Caolán McNamara caolanm at redhat.com
Wed Nov 9 13:44:10 UTC 2016


 sw/source/core/layout/flowfrm.cxx |    1 +
 sw/source/core/layout/wsfrm.cxx   |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit c40e6060b2f0945cc9df052e8bdd578c88a258cb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 9 13:12:14 2016 +0000

    crashtesting: crash on layout of ooo107760-1.doc
    
    this has begun crashing since...
    
    commit 8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533
    Author: Khaled Hosny <khaledhosny at eglug.org>
    Date:   Wed Nov 2 23:52:06 2016 +0200
    
        "Enable the new text layout engine by default"
    
    but its presumably blameless
    
    Change-Id: I5d9bfcd3277ce6b71dce8dced6947ab38b12f148

diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 772d4cc..d517103 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -587,6 +587,7 @@ void SwFlowFrame::MoveSubTree( SwLayoutFrame* pParent, SwFrame* pSibling )
         //SwSectionFrame::MergeNext removing the pParent we're trying to reparent
         //into
         FlowFrameJoinLockGuard aJoinGuard(pParent);
+        SwFrameDeleteGuard aDeleteGuard(pParent);
         pOldParent = CutTree( &m_rThis );
         bInvaLay = PasteTree( &m_rThis, pParent, pSibling, pOldParent );
     }
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b62012d..ec8d94b 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -963,8 +963,11 @@ void SwContentFrame::Cut()
                         if( pTmp )
                             pTmp->InvalidatePrt_();
                     }
-                    pUp->Cut();
-                    SwFrame::DestroyFrame(pUp);
+                    if (!pUp->IsDeleteForbidden())
+                    {
+                        pUp->Cut();
+                        SwFrame::DestroyFrame(pUp);
+                    }
                 }
                 else
                 {


More information about the Libreoffice-commits mailing list