summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-15 09:46:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-15 09:49:42 +0100
commit78751ef3be02d6dcddf56830ec60f792096697c2 (patch)
treeb4ee59e53b87d66e5b342658a9a916df1e8f0a56
parent7c1d47f460888bd742c4ebcae64407b9af1f5fff (diff)
Band-aid fix for SvtBroadcaster::Broadcast
...after 18d07b2affbbbfb2ff9152d3ad8d1744fe75ab47 "Rework SvtListener and SvtBroadcaster internals" broke the case where SvtBroadcaster::Add/Remove is called from within SvtBroadcaster::Broadcast, and at least CppunitTest_sc_ucalc started to fail. It should be evaluated whether the original SvtBroadcaster logic to handle this was better than taking a copy here. Change-Id: Ie47bccb8c5789e405349a9c8b89f30b1dba3cfba
-rw-r--r--svl/source/notify/broadcast.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx
index 96d34a7f6ced..24b5790c0336 100644
--- a/svl/source/notify/broadcast.cxx
+++ b/svl/source/notify/broadcast.cxx
@@ -114,7 +114,8 @@ SvtBroadcaster::~SvtBroadcaster()
void SvtBroadcaster::Broadcast( const SfxHint &rHint )
{
Normalize();
- std::for_each(maListeners.begin(), maListeners.end(), NotifyHandler(*this, rHint));
+ ListenersType listeners(maListeners);
+ std::for_each(listeners.begin(), listeners.end(), NotifyHandler(*this, rHint));
}
void SvtBroadcaster::ListenersGone() {}