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