From fc6a4565902b74280a68db2be7486acdac99a19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 5 Aug 2025 21:40:37 +0100 Subject: [PATCH] cid#1660229 Double lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OInterfaceContainerHelper4::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 --- sd/source/ui/slideshow/slideshowviewimpl.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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& 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 )