diff options
author | Fyodor Yemelyanenko <fyodor_e@hotmail.com> | 2018-01-10 10:27:08 +1000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-02-15 09:56:14 +0100 |
commit | aac475436271ddeabf6d9a4c3984ba77accf56ce (patch) | |
tree | 24ba9ad20a168a2a75b8bb69acb9762357b54815 /sw/source/core/edit/acorrect.cxx | |
parent | 798a989937a4acf7830588637f8c3902b4d985d8 (diff) |
tdf#83260 editeng sw: avoid accessing dead nodes in AutoCorrect
When change tracking is ON (Redlining) and Edit->Change Tracking->Show==OFF
Autocorrection and Undo operations crash LO.
Change-Id: I616f2de143b78fc83483a6589cfa1dd1ab61675a
Reviewed-on: https://gerrit.libreoffice.org/47686
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/core/edit/acorrect.cxx')
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index fbce36232d08..d2595462212f 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -339,6 +339,12 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, { // replace the selection pDoc->getIDocumentContentOperations().ReplaceRange( aPam, pFnd->GetLong(), false); + // tdf#83260 After calling sw::DocumentContentOperationsManager::ReplaceRange + // pTextNd may become invalid when change tracking is on and Edit -> Track Changes -> Show == OFF. + // ReplaceRange shows changes, this moves deleted nodes from special section to document. + // Then Show mode is disabled again. As a result pTextNd may be invalidated. + pTextNd = rCursor.GetNode().GetTextNode(); + bRet = true; } } |