sw/source/core/txtnode/ndtxt.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
New commits: commit d246fcf94638604911ef11ff2f4bdc0c5ba8dbfc Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Dec 20 12:03:00 2021 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Dec 20 15:18:37 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> diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 581c7f344a74..872e4cee96db 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -878,9 +878,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! } }