diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-20 12:03:00 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-20 15:18:37 +0100 |
commit | d246fcf94638604911ef11ff2f4bdc0c5ba8dbfc (patch) | |
tree | 3766fa9740dde3f3cd318d494a896ee2696cc14f /sw | |
parent | f16fd6725582659602ca8b138937db7283a81bf3 (diff) |
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.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
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! } } |