diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-14 19:34:36 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-12-17 11:24:55 +0100 |
commit | dc3a473ef127bf804ffe23e5db869db6d61bd7a9 (patch) | |
tree | 1a20685fe8657697eca290a98596a802bf356159 /sw/source/core/doc/DocumentContentOperationsManager.cxx | |
parent | tdf#136855 sw: fix ReplaceRangeImpl() restoring of rPam (diff) | |
download | core-dc3a473ef127bf804ffe23e5db869db6d61bd7a9.tar.gz core-dc3a473ef127bf804ffe23e5db869db6d61bd7a9.zip |
tdf#141175 sw_redlinehide: fix crash in lcl_DeleteRedlines()
The GetNext() returns itself if it's alone in the Ring.
(regression from 27aa4b16bf704d0246595750daf57b57ff2577b3)
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)
Change-Id: Idf92ce5362c4a4acf1582f463fe7bafc8553b400
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126954
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/core/doc/DocumentContentOperationsManager.cxx')
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index c3e5298c81da..758c990e927e 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -387,7 +387,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()); |