sw/source/core/doc/DocumentContentOperationsManager.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7bd657b5dac270dae09cd0fe2b22d23fd2fc7245
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Oct 18 16:51:38 2022 -0400
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Nov 3 16:42:07 2022 +0100

    sw: fix Content Node assertion
    
    assert(nNode.GetNode().GetContentNode() && "only valid to call this if we 
point to an SwContentNode");
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I31664decd83a1db92858c6d5efac90949eddb3ef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141517
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index a49ed387aac3..0e23b4310c49 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2199,7 +2199,9 @@ bool DocumentContentOperationsManager::DelFullPara( 
SwPaM& rPam )
 
         SwContentNode *pTmpNode = rPam.GetPoint()->GetNode().GetContentNode();
         bool bGoNext = (nullptr == pTmpNode);
-        rPam.GetMark()->SetContent( 0 );
+
+        if (rPam.GetMark()->GetContentNode())
+            rPam.GetMark()->SetContent( 0 );
 
         m_rDoc.GetIDocumentUndoRedo().ClearRedo();
 

Reply via email to