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:18:22 +0200
commit80cee9c82cab9466c4b2e7622e395efb0e066adb (patch)
tree09945f4ff30fcf5f387f66112b64a9dd15ef73e2 /sw
parent2327f65ccf8231cef7e6ed4a9fb0df8dbdaa15f2 (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 (cherry picked from commit bb6ecd8b40313b7cc83d4e619029f4e001334a52)
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 228bc59ff5a5..fad2d679b026 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -759,7 +759,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 ));
}