sw/source/core/txtnode/ndtxt.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit 0832b5487ab41f850a73931ad31d85d989c7aa26 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Dec 20 12:03:00 2021 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Dec 28 09:28:01 2021 +0100 tdf#137318 sw_redlinehide: fix assert on export moz715138-3.doc to ODF (regression from 31f51598fd08c2b76583a1baad0c0d6d4b336664) Change-Id: Ia3e5d25e46da3016d1af9f5e1dbdcfc6bdd46457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127145 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit d246fcf94638604911ef11ff2f4bdc0c5ba8dbfc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127170 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> (cherry picked from commit 66526bc24b884b361b06aea7529227b486423853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127262 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 0dc24c708ca2..4be2408ce1e8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -876,9 +876,13 @@ void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate const eRecreateMerg assert(rFirstNode.GetIndex() <= rNode.GetIndex()); pFrame->SetMergedPara(sw::CheckParaRedlineMerge( *pFrame, rFirstNode, eMode)); - assert(pFrame->GetMergedPara()); - assert(pFrame->GetMergedPara()->listener.IsListeningTo(&rNode)); - assert(rNode.GetIndex() <= pFrame->GetMergedPara()->pLastNode->GetIndex()); + // there is no merged para in case the deleted node had one but + // nothing was actually hidden + if (pFrame->GetMergedPara()) + { + assert(pFrame->GetMergedPara()->listener.IsListeningTo(&rNode)); + assert(rNode.GetIndex() <= pFrame->GetMergedPara()->pLastNode->GetIndex()); + } eMode = sw::FrameMode::New; // Existing is not idempotent! } }