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(m_xComp.get()) ) return; - std::unique_lock aGuard( m_aMutex ); - // Remove EventListener Reference xEvtLstnr = static_cast(this); m_xComp->removeEventListener( xEvtLstnr );