summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-08-29 20:08:01 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-08-29 22:39:19 +0200
commit9626fe5447e0ce71e0d13a5cea5c323c77113304 (patch)
tree0cd7d5594ac4e54764c44350853b9394ee446e8a
parent42546d4a0a6f73bf2408108a767be91030cc17f6 (diff)
cid#1607370 Check of thread-shared field evades lock acquisition
apparently since: commit 8228227168a7eb3ebf14629bec87f01536c23970 CommitDate: Thu Dec 8 17:27:05 2016 +0000 convert OSL_ENSURE to assert in AccessibleEventNotifier Change-Id: If4ad0459e39e44a9417dd074560538f2a87586b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172615 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--svtools/source/control/accessibleruler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/svtools/source/control/accessibleruler.cxx b/svtools/source/control/accessibleruler.cxx
index 2752cf7f7d4b..c188895444f3 100644
--- a/svtools/source/control/accessibleruler.cxx
+++ b/svtools/source/control/accessibleruler.cxx
@@ -231,11 +231,14 @@ void SAL_CALL SvtRulerAccessible::addAccessibleEventListener( const uno::Referen
void SAL_CALL SvtRulerAccessible::removeAccessibleEventListener( const uno::Reference< XAccessibleEventListener >& xListener )
{
- if (!(xListener.is() && mnClientId))
+ if (!xListener.is())
return;
std::unique_lock aGuard( m_aMutex );
+ if (!mnClientId)
+ return;
+
sal_Int32 nListenerCount = comphelper::AccessibleEventNotifier::removeEventListener( mnClientId, xListener );
if ( !nListenerCount )
{