Browse Source

Fix crash when some LV2 UIs are closed

tags/1.9.4
falkTX 10 years ago
parent
commit
58b1c300ad
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      source/backend/plugin/Lv2Plugin.cpp

+ 3
- 2
source/backend/plugin/Lv2Plugin.cpp View File

@@ -1327,7 +1327,8 @@ public:
else if (fUi.type == UI::TYPE_EMBED && fUi.window != nullptr) else if (fUi.type == UI::TYPE_EMBED && fUi.window != nullptr)
fUi.window->idle(); fUi.window->idle();


if (fExt.uiidle != nullptr && fExt.uiidle->idle(fUi.handle) != 0)
// note: UI might have been closed by ext-ui or window idle
if (fUi.handle != nullptr && fExt.uiidle != nullptr && fExt.uiidle->idle(fUi.handle) != 0)
{ {
showCustomUI(false); showCustomUI(false);
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
@@ -4113,7 +4114,7 @@ public:
{ {
CARLA_SAFE_ASSERT_RETURN(fUi.type == UI::TYPE_EMBED,); CARLA_SAFE_ASSERT_RETURN(fUi.type == UI::TYPE_EMBED,);
CARLA_SAFE_ASSERT_RETURN(fUi.window != nullptr,); CARLA_SAFE_ASSERT_RETURN(fUi.window != nullptr,);
carla_debug("Lv2Plugin::handleExternalUiClosed()");
carla_debug("Lv2Plugin::handlePluginUiClosed()");


fUi.window->hide(); fUi.window->hide();




Loading…
Cancel
Save