From 72161837b8d73cfc9450954c7181a9f47d2042d6 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 1 Jun 2018 21:19:07 +0200 Subject: sw_redlinehide: SwContentFrame::DestroyImpl() Change-Id: I4539ef0a7dc04de1c87cf6f54ca319dbdc719755 --- sw/source/core/layout/ssfrm.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'sw/source/core/layout/ssfrm.cxx') diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 5ec16d3509d0..7be4a5615a5d 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -414,9 +414,14 @@ SwContentFrame::SwContentFrame( SwContentNode * const pContent, SwFrame* pSib ) void SwContentFrame::DestroyImpl() { - const SwContentNode* pCNd; - if( nullptr != ( pCNd = dynamic_cast( GetRegisteredIn() ) ) && - !pCNd->GetDoc()->IsInDtor() ) + const SwContentNode* pCNd(dynamic_cast(GetDep())); + if (nullptr == pCNd && IsTextFrame()) + { + pCNd = static_cast(this)->GetTextNodeFirst(); + } + // IsInDtor shouldn't be happening with ViewShell owning layout + assert(nullptr == pCNd || !pCNd->GetDoc()->IsInDtor()); + if (nullptr != pCNd && !pCNd->GetDoc()->IsInDtor()) { //Unregister from root if I'm still in turbo there. SwRootFrame *pRoot = getRootFrame(); -- cgit v1.2.3