Browse Source

Add basic checks to VST UI handling

tags/1.9.4
falkTX 11 years ago
parent
commit
35514f4632
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      source/backend/plugin/VstPlugin.cpp

+ 7
- 0
source/backend/plugin/VstPlugin.cpp View File

@@ -363,6 +363,9 @@ public:


void showGui(const bool yesNo) override void showGui(const bool yesNo) override
{ {
if (fGui.isVisible == yesNo)
return;

if (fGui.isOsc) if (fGui.isOsc)
{ {
if (yesNo) if (yesNo)
@@ -386,6 +389,8 @@ public:
{ {
if (yesNo) if (yesNo)
{ {
CARLA_ASSERT(kData->gui == nullptr);

if (kData->gui == nullptr) if (kData->gui == nullptr)
{ {
CarlaPluginGui::Options guiOptions; CarlaPluginGui::Options guiOptions;
@@ -439,6 +444,8 @@ public:
} }
else else
{ {
CARLA_ASSERT(kData->gui != nullptr);

dispatcher(effEditClose, 0, 0, nullptr, 0.0f); dispatcher(effEditClose, 0, 0, nullptr, 0.0f);


if (kData->gui != nullptr) if (kData->gui != nullptr)


Loading…
Cancel
Save