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();