From ea354226c19c65c81e4b0685caef1d0e5d005eab Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 21 Mar 2016 21:39:11 +0100 Subject: [PATCH] catch lua exceptions. --- gtk2_ardour/processor_box.cc | 12 ++++++++---- 1 file 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; } -- 2.30.2