diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 21:19:07 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:35 +0200 |
commit | 72161837b8d73cfc9450954c7181a9f47d2042d6 (patch) | |
tree | 506930927bf6e8a70a119619b609b64097bea8f3 | |
parent | ba150b06401959fca0b38e41683846891b712d33 (diff) |
sw_redlinehide: SwContentFrame::DestroyImpl()
Change-Id: I4539ef0a7dc04de1c87cf6f54ca319dbdc719755
-rw-r--r-- | sw/source/core/layout/ssfrm.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
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<SwContentNode*>( GetRegisteredIn() ) ) && - !pCNd->GetDoc()->IsInDtor() ) + const SwContentNode* pCNd(dynamic_cast<SwContentNode*>(GetDep())); + if (nullptr == pCNd && IsTextFrame()) + { + pCNd = static_cast<SwTextFrame*>(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(); |