sw/source/core/docnode/node.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 6767a309b7c3ddd283a83bcf7dc36fecaf9cc6b9
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue May 17 14:09:08 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed May 18 10:39:11 2022 +0200

    tdf#148461 sw_redlinehide: fix assert in SwContentNode::DelFrames()
    
    The assert(pMerged->pFirstNode->GetIndex() <= i) is intended for when
    frames are really deleted, but CheckParaRedlineMerge() calls it while
    the now-outdated MergedPara is still on the frame, but the nodes already
    have new flags; assign a dummy node in this situation.
    
    Change-Id: I23fbfdb6901e6e15abf92913aa252e59877bc280
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134475
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit 6ee57b39ba912f0902714d8c4d1a267511a3c6ca)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134446
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index c9b4a41f42fe..12be064f370b 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1450,6 +1450,12 @@ void SwContentNode::DelFrames(SwRootFrame const*const 
pLayout)
                                 pMerged->pParaPropsNode = pNode->GetTextNode();
                                 break;
                             }
+                            else if (pMerged->pFirstNode->GetIndex() == i)
+                            {   // this can only happen when called from 
CheckParaRedlineMerge()
+                                // and the pMerged will be deleted anyway
+                                pMerged->pParaPropsNode = pMerged->pFirstNode;
+                                break;
+                            }
                         }
                         
assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode));
                     }

Reply via email to