summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-28 20:03:42 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-30 21:33:58 +0200
commit73db214e2f4f15c068d4e946ab0face6d0420199 (patch)
tree3b6a897317212a771b1d3cc896e57de3cd4bff51 /forms/source
parenteb73e2c8b66ef3539e68ee8150e119bbe437955c (diff)
cid#1606905 Data race condition
Change-Id: I138cc2ef0f30ae4dcb0d86ada3a62507efc22340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174206 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/EventThread.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/forms/source/component/EventThread.cxx b/forms/source/component/EventThread.cxx
index 2d5336fe384b..62b0af091c8f 100644
--- a/forms/source/component/EventThread.cxx
+++ b/forms/source/component/EventThread.cxx
@@ -76,11 +76,11 @@ void OComponentEventThread::impl_clearEventQueue()
void OComponentEventThread::disposing( const EventObject& evt )
{
+ std::unique_lock aGuard( m_aMutex );
+
if( evt.Source != static_cast<XWeak*>(m_xComp.get()) )
return;
- std::unique_lock aGuard( m_aMutex );
-
// Remove EventListener
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
m_xComp->removeEventListener( xEvtLstnr );