diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index c6560de5d6..384aa86dca 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1124,10 +1124,11 @@ struct DLLHandle typedef bool (PLUGIN_API *ExitModuleFn) (); #if JUCE_WINDOWS + releaseFactory(); + if (ExitModuleFn exitFn = (ExitModuleFn) getFunction ("ExitDll")) exitFn(); - releaseFactory(); library.close(); #else