summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-06-03 12:24:18 +0200
committerMichael Stahl <mstahl@redhat.com>2013-06-03 16:16:41 +0200
commitbb6ecd8b40313b7cc83d4e619029f4e001334a52 (patch)
tree57de43749a8899323b9535b6f3d74d10ecb0fc44 /sw
parent32343a92ecefedd29b38bf7842672090fa0c7a88 (diff)
sw: fix ~SwIndexReg assert
Not really a problem, since local aRegion's point is not used after its node is deleted. Change-Id: Ibeb885fb31f19b02e4c3c63e3b99d00ced756810
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 664d5aa5316e..08c68a074be8 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -751,7 +751,12 @@ namespace sw
SwRedlineData aData(pFltRedline->eType, pFltRedline->nAutorNo,
pFltRedline->aStamp, aEmptyStr, 0);
- mrDoc.AppendRedline(new SwRedline(aData, aRegion), true);
+ SwRedline *const pNewRedline(new SwRedline(aData, aRegion));
+ // the point node may be deleted in AppendRedline, so park
+ // the PaM somewhere safe
+ aRegion.DeleteMark();
+ *aRegion.GetPoint() = SwPosition(SwNodeIndex(mrDoc.GetNodes()));
+ mrDoc.AppendRedline(pNewRedline, true);
mrDoc.SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_NONE | nsRedlineMode_t::REDLINE_SHOW_INSERT |
nsRedlineMode_t::REDLINE_SHOW_DELETE ));
}