From 35514f4632e1cf9774cdc7d5a872f992513177e7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 26 Apr 2013 06:52:58 +0100 Subject: [PATCH] Add basic checks to VST UI handling --- source/backend/plugin/VstPlugin.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/backend/plugin/VstPlugin.cpp b/source/backend/plugin/VstPlugin.cpp index 5c7b4ee5f..2621f5435 100644 --- a/source/backend/plugin/VstPlugin.cpp +++ b/source/backend/plugin/VstPlugin.cpp @@ -363,6 +363,9 @@ public: void showGui(const bool yesNo) override { + if (fGui.isVisible == yesNo) + return; + if (fGui.isOsc) { if (yesNo) @@ -386,6 +389,8 @@ public: { if (yesNo) { + CARLA_ASSERT(kData->gui == nullptr); + if (kData->gui == nullptr) { CarlaPluginGui::Options guiOptions; @@ -439,6 +444,8 @@ public: } else { + CARLA_ASSERT(kData->gui != nullptr); + dispatcher(effEditClose, 0, 0, nullptr, 0.0f); if (kData->gui != nullptr)