Catch Lua exception when scanning scripts

This commit is contained in:
Robin Gareus
2017-08-21 17:07:54 +02:00
parent 18060e597e
commit 5a8bdf40f2

View File

@@ -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 (...) { }
}
}