diff --git a/modules/juce_core/containers/juce_ListenerList.h b/modules/juce_core/containers/juce_ListenerList.h index bdfd476d9b..ee8ec18041 100644 --- a/modules/juce_core/containers/juce_ListenerList.h +++ b/modules/juce_core/containers/juce_ListenerList.h @@ -171,6 +171,8 @@ public: if (! initialised()) return; + const ScopedLockType lock { listeners->getLock() }; + listeners->clear(); for (auto* it : *iterators)