Lua may call C++ functions with throw. Catch them

This commit is contained in:
Robin Gareus 2017-08-19 01:05:08 +02:00
parent fb745cc5a8
commit 2cc32456ab
5 changed files with 54 additions and 18 deletions

View file

@ -221,8 +221,11 @@ SessionDialog::meta_master_bus_profile (std::string script_path) const
err = lua.do_file (script_path);
} catch (luabridge::LuaException const& e) {
err = -1;
} catch (...) {
err = -1;
}
if (err) {
return UINT32_MAX;
}