From da43672aa362e47525f4b4dbe4b92ed4ab0cdd75 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 18 Mar 2014 17:29:14 +0000 Subject: [PATCH] Workaround for some VST3 plugins crashing. --- .../format_types/juce_VST3PluginFormat.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 121d160514..93b4b65710 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1634,7 +1634,11 @@ public: bool hasEditor() const override { - ComSmartPtr view (tryCreatingView()); //N.B.: Must use a ComSmartPtr to not delete the view from the plugin permanently! + // (if possible, avoid creating a second instance of the editor, because that crashes some plugins) + if (getActiveEditor() != nullptr) + return true; + + ComSmartPtr view (tryCreatingView()); return view != nullptr; }