summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-12-14 19:34:36 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-12-14 20:43:35 +0100
commit19f2054c6063177d08c818c5b7eeba7ab9178249 (patch)
treed671290baf9b04094245849cd4dab2dc886aa8d4 /sw/source/core/doc
parentd16c5f47600d236e911ae50d0e58a3f2256f5a61 (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>
Diffstat (limited to 'sw/source/core/doc')
-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 75a365908d53..3ddcf13c698e 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());