1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

ListenerList: Prevent a data race while clearing the list

This commit is contained in:
Anthony Nicholls 2024-06-13 11:22:04 +01:00
parent 6ec5c0216b
commit 29cb346db2

View file

@ -171,6 +171,8 @@ public:
if (! initialised())
return;
const ScopedLockType lock { listeners->getLock() };
listeners->clear();
for (auto* it : *iterators)