From 5a8bdf40f20c788dc68fd0478ab4b9399db1c0e0 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 21 Aug 2017 17:07:54 +0200 Subject: [PATCH] Catch Lua exception when scanning scripts --- libs/ardour/luascripting.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/ardour/luascripting.cc b/libs/ardour/luascripting.cc index a63dc9ea48..5d0b45aaf5 100644 --- a/libs/ardour/luascripting.cc +++ b/libs/ardour/luascripting.cc @@ -294,9 +294,11 @@ LuaScripting::scan_script (const std::string &fn, const std::string &sc) luabridge::LuaRef lua_ss = luabridge::getGlobal (L, "session_setup"); if (lua_ss.isFunction ()) { - if (lua_ss () == true) { - lsi->subtype |= LuaScriptInfo::SessionSetup; - } + try { + if (lua_ss () == true) { + lsi->subtype |= LuaScriptInfo::SessionSetup; + } + } catch (...) { } } }