diff --git a/source/backend/engine/CarlaEngineInternal.cpp b/source/backend/engine/CarlaEngineInternal.cpp index 3e71e3f72..ad1acf725 100644 --- a/source/backend/engine/CarlaEngineInternal.cpp +++ b/source/backend/engine/CarlaEngineInternal.cpp @@ -747,9 +747,14 @@ ScopedActionLock::ScopedActionLock(CarlaEngine* const engine, for (int i = 10; --i >= 0;) { if (pData->nextAction.sem != nullptr) - carla_sem_timedwait(*pData->nextAction.sem, 200); + { + if (carla_sem_timedwait(*pData->nextAction.sem, 200)) + break; + } else + { carla_msleep(200); + } if (! engine->isRunning()) {