diff options
author | Robin Gareus <robin@gareus.org> | 2016-03-21 21:39:11 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-03-21 21:39:11 +0100 |
commit | ea354226c19c65c81e4b0685caef1d0e5d005eab (patch) | |
tree | 49f37ca1a3f90a7fa41f82eb6d16a3201ce32e00 /gtk2_ardour | |
parent | 850d793c00d7e89395b5890557f28a5b807434ec (diff) |
catch lua exceptions.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index c5428ae2e0..c889d72e4a 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -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; } |