diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-02-14 00:47:59 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-02-15 10:41:46 +0000 |
commit | ef0d23e6b7a8330e070c93a59c33b0ce4a8896d5 (patch) | |
tree | 2d9b901d0c2e751fd20e571177694e68563a7ee2 /sw/source/core/docnode/node.cxx | |
parent | a16c64ad808c3ef79fb9b8954c4f33e9e0ff855a (diff) |
SwContentNode: assert on dead code
Change-Id: Id094b0c244a55581fe3db1773788b4dd31698a24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146963
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r-- | sw/source/core/docnode/node.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index c50435e076fb..6002830a2525 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1143,15 +1143,10 @@ void SwContentNode::SwClientNotify( const SwModify&, const SfxHint& rHint) // Do not mangle pointers if it is the upper-most format! if(pFormat && GetRegisteredIn() == pFormat) { - if(pFormat->GetRegisteredIn()) - { - // If Parent, register anew in the new Parent - pFormat->GetRegisteredIn()->Add(this); - pFormatColl = GetFormatColl(); - } - else - EndListeningAll(); - bSetParent = true; + // As ~SwFormat calls CheckRegistrationFormat before + // ~SwModify, which sends the RES_OBJECTDYING, we should never + // reach this point. + assert(false); } } break; |