From 5a2ebefa00b312868ed761b53e68afcc91a5cef7 Mon Sep 17 00:00:00 2001 From: hogliux Date: Fri, 11 Nov 2016 15:44:54 +0000 Subject: [PATCH] Fixed a bug where the bundle exit function would be called before the VST3 factory is released --- .../format_types/juce_VST3PluginFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 3b3851ac61..a2a35b2e8a 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1139,11 +1139,11 @@ struct DLLHandle #else if (bundleRef != nullptr) { + releaseFactory(); + if (ExitModuleFn exitFn = (ExitModuleFn) getFunction ("bundleExit")) exitFn(); - releaseFactory(); - CFRelease (bundleRef); bundleRef = nullptr; }