diff --git a/source/backend/plugin/CarlaPluginVST2.cpp b/source/backend/plugin/CarlaPluginVST2.cpp index ef237af5d..ebd0e7e79 100644 --- a/source/backend/plugin/CarlaPluginVST2.cpp +++ b/source/backend/plugin/CarlaPluginVST2.cpp @@ -24,6 +24,7 @@ #include "CarlaBackendUtils.hpp" #include "CarlaMathUtils.hpp" +#include "CarlaProcessUtils.hpp" #include "CarlaScopeUtils.hpp" #include "CarlaVstUtils.hpp" @@ -2418,9 +2419,13 @@ public: sCurrentUniqueId = static_cast(uniqueId); sLastCarlaPluginVST2 = this; - try { - fEffect = vstFn(carla_vst_audioMasterCallback); - } CARLA_SAFE_EXCEPTION_RETURN("Vst init", false); + { + const ScopedAbortCatcher sac; + + try { + fEffect = vstFn(carla_vst_audioMasterCallback); + } CARLA_SAFE_EXCEPTION_RETURN("Vst init", false); + } sLastCarlaPluginVST2 = nullptr; sCurrentUniqueId = 0; diff --git a/source/utils/CarlaProcessUtils.cpp b/source/utils/CarlaProcessUtils.cpp index 3d609c60f..b50535300 100644 --- a/source/utils/CarlaProcessUtils.cpp +++ b/source/utils/CarlaProcessUtils.cpp @@ -33,7 +33,7 @@ ScopedAbortCatcher::ScopedAbortCatcher() ScopedAbortCatcher::~ScopedAbortCatcher() { #ifndef CARLA_OS_WIN - if (! s_triggered) + if (s_oldsig != nullptr && ! s_triggered) std::signal(SIGABRT, s_oldsig); #endif }