Kaydet (Commit) 1d0839fb authored tarafından Noel Grandin's avatar Noel Grandin

fix for tdf#94827 - ToolBox events aren't delivered

regression from 1e67e94f
"convert Link<> to typed"

Change-Id: Ibb20366f0edcb9425d61ce5e9d5fb1a34533785b
üst 97c41475
......@@ -238,16 +238,17 @@ void Window::CallEventListeners( sal_uLong nEvent, void* pData )
if ( aDelData.IsDead() )
return;
if (!mpWindowImpl->maEventListeners.empty())
auto& rChildListeners = pWindow->mpWindowImpl->maChildEventListeners;
if (!rChildListeners.empty())
{
// Copy the list, because this can be destroyed when calling a Link...
std::vector<Link<VclWindowEvent&,void>> aCopy( mpWindowImpl->maChildEventListeners );
std::vector<Link<VclWindowEvent&,void>> aCopy( rChildListeners );
for ( Link<VclWindowEvent&,void>& rLink : aCopy )
{
if (aDelData.IsDead())
return;
// check this hasn't been removed in some re-enterancy scenario fdo#47368
if( std::find(mpWindowImpl->maChildEventListeners.begin(), mpWindowImpl->maChildEventListeners.end(), rLink) != mpWindowImpl->maChildEventListeners.end() )
if( std::find(rChildListeners.begin(), rChildListeners.end(), rLink) != rChildListeners.end() )
rLink.Call( aEvent );
}
}
......
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