From 4e8df54b4fae1cc8b0b16eca537d93893b363140 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 24 Jan 2014 13:34:37 +0000 Subject: [PATCH] VST3 hosting fix. --- .../format_types/juce_VST3PluginFormat.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index 232cbed119..c5a73453b8 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1995,10 +1995,7 @@ public: //============================================================================== AudioProcessorEditor* createEditor() override { - if (view == nullptr) - view = tryCreatingView(); - - if (view != nullptr) + if (IPlugView* view = tryCreatingView()) return new VST3PluginWindow (this, view); return nullptr; @@ -2006,9 +2003,7 @@ public: bool hasEditor() const override { - if (view == nullptr) - view = tryCreatingView(); - + ComSmartPtr view (tryCreatingView()); return view != nullptr; } @@ -2147,8 +2142,6 @@ private: ComSmartPtr componentConnection; ComSmartPtr editControllerConnection; - mutable ComSmartPtr view; - /** The number of IO busses MUST match that of the plugin, even if there aren't enough channels to process, as very poorly specified by the Steinberg SDK