summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-12-20 12:03:00 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-12-21 09:32:08 +0100
commit66526bc24b884b361b06aea7529227b486423853 (patch)
tree4b3305b78e194b259ae6f3a54483b779b4652c50 /sw
parentd8cf8482ae5ed72dc969d9adb47c113c442452be (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> (cherry picked from commit d246fcf94638604911ef11ff2f4bdc0c5ba8dbfc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127170 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx10
1 files changed, 7 insertions, 3 deletions
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!
}
}