catch lua exceptions.

This commit is contained in:
Robin Gareus 2016-03-21 21:39:11 +01:00
parent 850d793c00
commit ea354226c1

View File

@ -1384,10 +1384,14 @@ uint32_t
ProcessorEntry::LuaPluginDisplay::render_inline (cairo_t *cr, uint32_t width)
{
Cairo::Context ctx (cr);
luabridge::LuaRef rv = (*_lua_render_inline)((Cairo::Context *)&ctx, width, _max_height);
if (rv.isTable ()) {
uint32_t h = rv[2];
return h;
try {
luabridge::LuaRef rv = (*_lua_render_inline)((Cairo::Context *)&ctx, width, _max_height);
if (rv.isTable ()) {
uint32_t h = rv[2];
return h;
}
} catch (luabridge::LuaException const& e) {
;
}
return 0;
}