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:
parent
6ec5c0216b
commit
29cb346db2
1 changed files with 2 additions and 0 deletions
|
|
@ -171,6 +171,8 @@ public:
|
|||
if (! initialised())
|
||||
return;
|
||||
|
||||
const ScopedLockType lock { listeners->getLock() };
|
||||
|
||||
listeners->clear();
|
||||
|
||||
for (auto* it : *iterators)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue