summaryrefslogtreecommitdiff
path: root/vcl/source/window/event.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-08 10:51:19 +0200
committerNoel Grandin <noel@peralex.com>2015-10-08 11:02:49 +0200
commit1d0839fb98b8ec672e22b21867297317c8a961ee (patch)
treeebee6a176e53da86f6fc8f1be1c25afed871319d /vcl/source/window/event.cxx
parent97c414758d3d8aa3cc2233d52612cf0a33c24c34 (diff)
fix for tdf#94827 - ToolBox events aren't delivered
regression from 1e67e94f1a308ca60d4934e9fe9d5c048225ebe8 "convert Link<> to typed" Change-Id: Ibb20366f0edcb9425d61ce5e9d5fb1a34533785b
Diffstat (limited to 'vcl/source/window/event.cxx')
-rw-r--r--vcl/source/window/event.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index ac950d6b8479..548e8704054c 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -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 );
}
}