diff --git a/core/AmEventDispatcher.cpp b/core/AmEventDispatcher.cpp index 8f1b4c8f..65962c89 100644 --- a/core/AmEventDispatcher.cpp +++ b/core/AmEventDispatcher.cpp @@ -136,9 +136,12 @@ bool AmEventDispatcher::broadcast(AmEvent* ev) bool posted = false; m_queues.lock(); - for (EvQueueMapIter it = queues.begin(); - it != queues.end(); it++) { + EvQueueMapIter it = queues.begin(); + while (it != queues.end()) { + it++; + m_queues.unlock(); it->second->postEvent(ev->clone()); + m_queues.lock(); posted = true; }