From c40e6060b2f0945cc9df052e8bdd578c88a258cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 9 Nov 2016 13:12:14 +0000 Subject: [PATCH] crashtesting: crash on layout of ooo107760-1.doc this has begun crashing since... commit 8f2dd1df1d6cc94ebbc1149de72bc6d6dffa6533 Author: Khaled Hosny Date: Wed Nov 2 23:52:06 2016 +0200 "Enable the new text layout engine by default" but its presumably blameless Change-Id: I5d9bfcd3277ce6b71dce8dced6947ab38b12f148 --- sw/source/core/layout/flowfrm.cxx | 1 + sw/source/core/layout/wsfrm.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 772d4cc8a918..d517103922d6 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 b62012d76dae..ec8d94b1c56a 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 {