sd/source/ui/slideshow/slideshowviewimpl.cxx |   13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit fc6a4565902b74280a68db2be7486acdac99a19b
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Aug 5 21:40:37 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Aug 6 09:34:06 2025 +0200

    cid#1660229 Double lock
    
    OInterfaceContainerHelper4<ListenerT>::disposeAndClear will leave
    rGuard locked when it finishes
    
    Change-Id: Ifd01c7ed8d70e6332c1ac4ddc9b6b0315610d996
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188976
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx 
b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 7db8594e4e08..3f07a32b227b 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -187,21 +187,16 @@ void 
SlideShowView::disposingImpl(std::unique_lock<std::mutex>& rGuard)
         }
         rGuard.lock();
     }
+    assert(rGuard.owns_lock());
     if (maPaintListeners.getLength(rGuard))
-    {
         maPaintListeners.disposeAndClear( rGuard, evt );
-        rGuard.lock();
-    }
+    assert(rGuard.owns_lock());
     if (maMouseListeners.getLength(rGuard))
-    {
         maMouseListeners.disposeAndClear( rGuard, evt );
-        rGuard.lock();
-    }
+    assert(rGuard.owns_lock());
     if (maMouseMotionListeners.getLength(rGuard))
-    {
         maMouseMotionListeners.disposeAndClear( rGuard, evt );
-        rGuard.lock();
-    }
+    assert(rGuard.owns_lock());
 }
 
 void SlideShowView::paint( const awt::PaintEvent& e )

Reply via email to