Browse Source

Fix crash when removing carla-vst; Wait less time for ui close

tags/1.9.7
falkTX 10 years ago
parent
commit
8470f8dead
2 changed files with 7 additions and 5 deletions
  1. +3
    -3
      source/backend/engine/CarlaEngineNative.cpp
  2. +4
    -2
      source/plugin/carla-vst.cpp

+ 3
- 3
source/backend/engine/CarlaEngineNative.cpp View File

@@ -705,7 +705,7 @@ protected:
{
CarlaEngine::callback(action, pluginId, value1, value2, value3, valueStr);

if (action == ENGINE_CALLBACK_IDLE)
if (action == ENGINE_CALLBACK_IDLE && ! pData->aboutToClose)
pHost->dispatcher(pHost->handle, NATIVE_HOST_OPCODE_HOST_IDLE, 0, 0, nullptr, 0.0f);
}

@@ -1517,7 +1517,7 @@ protected:
}
else
{
fUiServer.stopPipeServer(5000);
fUiServer.stopPipeServer(2000);

// hide all custom uis
for (uint i=0; i < pData->curPluginCount; ++i)
@@ -1625,7 +1625,7 @@ protected:
break;
case CarlaExternalUI::UiHide:
pHost->ui_closed(pHost->handle);
fUiServer.stopPipeServer(2000);
fUiServer.stopPipeServer(1000);
break;
}
}


+ 4
- 2
source/plugin/carla-vst.cpp View File

@@ -729,10 +729,12 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t
case effClose:
if (VstObject* const obj = vstObjectPtr)
{
if (obj->plugin != nullptr)
NativePlugin* const plugin(obj->plugin);

if (plugin != nullptr)
{
delete obj->plugin;
obj->plugin = nullptr;
delete plugin;
}

#if 0


Loading…
Cancel
Save