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 13:52:54 +0100
commit1f7f15eb41a76e0dee17dead3aad0baca2451d94 (patch)
tree7f717651f16e27d1d6e46962dbbcb8b560f9f5cf /sw
parentf94869d8f0f0271bdf40fc0324f7a3bfa7222370 (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/+/126824 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 7b672a6d89581885c305068a714a72b5352de12f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126867 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-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 457e5aa61555..363484191849 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());