sw/source/core/docnode/node.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit acad0f0c53b788f40b2e8344a1c0fe63333e862e Author: Michael Stahl <[email protected]> AuthorDate: Tue May 17 14:09:08 2022 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Tue Jun 21 11:34:25 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 <[email protected]> (cherry picked from commit 6ee57b39ba912f0902714d8c4d1a267511a3c6ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134446 Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 6767a309b7c3ddd283a83bcf7dc36fecaf9cc6b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136176 Tested-by: Michael Stahl <[email protected]> diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 955e113f2768..0bf2729cd02c 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1384,6 +1384,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)); }
