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
This commit is contained in:
@@ -76,11 +76,11 @@ void OComponentEventThread::impl_clearEventQueue()
|
|||||||
|
|
||||||
void OComponentEventThread::disposing( const EventObject& evt )
|
void OComponentEventThread::disposing( const EventObject& evt )
|
||||||
{
|
{
|
||||||
|
std::unique_lock aGuard( m_aMutex );
|
||||||
|
|
||||||
if( evt.Source != static_cast<XWeak*>(m_xComp.get()) )
|
if( evt.Source != static_cast<XWeak*>(m_xComp.get()) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::unique_lock aGuard( m_aMutex );
|
|
||||||
|
|
||||||
// Remove EventListener
|
// Remove EventListener
|
||||||
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
Reference<XEventListener> xEvtLstnr = static_cast<XEventListener*>(this);
|
||||||
m_xComp->removeEventListener( xEvtLstnr );
|
m_xComp->removeEventListener( xEvtLstnr );
|
||||||
|
Reference in New Issue
Block a user