[Libreoffice-commits] .: Branch 'libreoffice-3-6' - vcl/source
Michael Meeks
michael at kemper.freedesktop.org
Mon Jul 23 08:10:34 PDT 2012
vcl/source/app/vclevent.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 222b7032153cfd3a6f5e12e2fc855ccabc2ea769
Author: Michael Meeks <michael.meeks at suse.com>
Date: Mon Jul 23 14:53:27 2012 +0100
fdo#47368 - fix one potential re-enterancy hazard around even emission
Change-Id: I8be50fb82d1333731dae825b1785e981fe69adbd
Signed-off-by: Norbert Thiebaud <nthiebaud at gmail.com>
diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index 613a659..2656c15 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -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++;
}
}
More information about the Libreoffice-commits
mailing list