summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docedt.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index b4c8e072b54b..22292b44d445 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2219,6 +2219,9 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
if (!Breaks.size())
{
+ // park aPam somewhere so it does not point to node that is deleted
+ aPam.DeleteMark();
+ *aPam.GetPoint() = SwPosition(GetNodes().GetEndOfContent());
return ReplaceRangeImpl(rPam, rStr, bRegExReplace); // original pam!
}