summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-12-14 19:34:36 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-12-15 08:39:39 +0100
commitd29f057ff03fcbccb81ccbac8d2ae2954ca3daef (patch)
tree014197ebd5510260d7d0d765675c1f8884398108 /sw
parenta5d4f32e6512acdec6402bd18ff958f07c9d327a (diff)
tdf#141175 sw_redlinehide: fix crash in lcl_DeleteRedlines()
The GetNext() returns itself if it's alone in the Ring. (regression from 27aa4b16bf704d0246595750daf57b57ff2577b3) Change-Id: Idf92ce5362c4a4acf1582f463fe7bafc8553b400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126844 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 19f2054c6063177d08c818c5b7eeba7ab9178249) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126823 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 8bff2555224a..304f44c77116 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -408,7 +408,8 @@ namespace
*pDelPam->GetPoint(), nDelCount );
}
- if (pDelPam->GetNext() && *pDelPam->GetNext()->End() == *pDelPam->Start())
+ if (pDelPam->GetNext() != pDelPam.get()
+ && *pDelPam->GetNext()->End() == *pDelPam->Start())
{
*pDelPam->GetNext()->End() = *pDelPam->End();
pDelPam.reset(pDelPam->GetNext());