diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-21 17:07:54 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-21 17:07:54 +0200 |
commit | 5a8bdf40f20c788dc68fd0478ab4b9399db1c0e0 (patch) | |
tree | 7539a4d5dfe5b6283a4dbde0df47f4239e258ba4 /libs | |
parent | 18060e597e536e8ff53fc423360d48d802f76f23 (diff) |
Catch Lua exception when scanning scripts
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/luascripting.cc | 8 |
1 files 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 (...) { } } } |