sw/source/core/docnode/node.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit ef0d23e6b7a8330e070c93a59c33b0ce4a8896d5
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Tue Feb 14 00:47:59 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Feb 15 10:41:46 2023 +0000

    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.st...@allotropia.de>

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;

Reply via email to