Kaydet (Commit) d5bbd67f authored tarafından Michael Meeks's avatar Michael Meeks

fdo#47368 - fix one potential re-enterancy hazard around even emission

Change-Id: I8be50fb82d1333731dae825b1785e981fe69adbd
üst 2ca73bfb
......@@ -69,7 +69,10 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
ImplDelData aDel( pWinEvent->GetWindow() );
while ( aIter != aCopy.end() && ! aDel.IsDead() )
{
(*aIter).Call( pEvent );
Link &rLink = *aIter;
// check this hasn't been removed in some re-enterancy scenario fdo#47368
if( std::find(m_aListeners.begin(), m_aListeners.end(), rLink) != m_aListeners.end() )
rLink.Call( pEvent );
aIter++;
}
}
......@@ -77,7 +80,9 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const
{
while ( aIter != aCopy.end() )
{
(*aIter).Call( pEvent );
Link &rLink = *aIter;
if( std::find(m_aListeners.begin(), m_aListeners.end(), rLink) != m_aListeners.end() )
rLink.Call( pEvent );
aIter++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment