sw/source/core/docnode/node.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 6ee57b39ba912f0902714d8c4d1a267511a3c6ca Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue May 17 14:09:08 2022 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue May 17 19:06:01 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> diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 330ffa5fe5f6..df2ffc3b4095 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -1449,6 +1449,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)); }