sw/source/core/unocore/unoportenum.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 769cefd9c49652f28ba58cd371bc60b9e1bd5bd0
Author:     Bjoern Michaelsen <bjoern.michael...@libreoffice.org>
AuthorDate: Sun Sep 11 17:30:32 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Tue Sep 13 14:11:00 2022 +0200

    tdf#129163: GC cursor table at the end of the life of an portion enumeration
    
    Change-Id: I864c0ba9ec43a5b164bb9a118911e0507f2a538a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139778
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/unocore/unoportenum.cxx 
b/sw/source/core/unocore/unoportenum.cxx
index be697524c11c..0e1e95053a3f 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -337,7 +337,11 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration(
 SwXTextPortionEnumeration::~SwXTextPortionEnumeration()
 {
     SolarMutexGuard aGuard;
-    m_pUnoCursor.reset(nullptr);
+    if( m_pUnoCursor )
+    {
+        m_pUnoCursor->GetDoc().cleanupUnoCursorTable();
+        m_pUnoCursor.reset(nullptr);
+    }
 }
 
 sal_Bool SwXTextPortionEnumeration::hasMoreElements()

Reply via email to