diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index f4f6bd822..ba444dc7f 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -286,6 +286,7 @@ void CarlaEngine::idle() noexcept { CARLA_SAFE_ASSERT_RETURN(pData->nextAction.opcode == kEnginePostActionNull,); // FIXME REMOVE CARLA_SAFE_ASSERT_RETURN(pData->nextPluginId == pData->maxPluginNumber,); + CARLA_SAFE_ASSERT_RETURN(getType() != kEngineTypePlugin,); for (uint i=0; i < pData->curPluginCount; ++i) { diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index 81b8f8bd6..747683c31 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -1536,9 +1536,7 @@ protected: if (plugin != nullptr && plugin->isEnabled()) { - const uint hints(plugin->getHints()); - - if ((hints & PLUGIN_HAS_CUSTOM_UI) != 0 && (hints & PLUGIN_NEEDS_UI_MAIN_THREAD) != 0) + if (plugin->getHints() & PLUGIN_HAS_CUSTOM_UI) { try { plugin->uiIdle(); @@ -1551,10 +1549,10 @@ protected: pData->osc.idle(); #endif - fUiServer.idlePipe(); - if (fUiServer.isPipeRunning()) { + fUiServer.idlePipe(); + const CarlaMutexLocker cml(fUiServer.getPipeLock()); #ifndef CARLA_OS_WIN const EngineTimeInfo& timeInfo(pData->timeInfo);