From b745ed9bd941f6abcab338cca5c911d7f1c3b57b Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 31 May 2019 10:00:27 +0100 Subject: [PATCH] Fixed a potential crash in KnownPluginList::removeType() --- .../juce_audio_processors/scanning/juce_KnownPluginList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp index 7b0adf4739..d97641ca81 100644 --- a/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp +++ b/modules/juce_audio_processors/scanning/juce_KnownPluginList.cpp @@ -105,9 +105,9 @@ void KnownPluginList::removeType (const PluginDescription& type) { ScopedLock lock (typesArrayLock); - for (auto& desc : types) - if (desc.isDuplicateOf (type)) - types.remove (&desc); + for (int i = types.size(); --i >= 0;) + if (types.getUnchecked (i).isDuplicateOf (type)) + types.remove (i); } sendChangeMessage();