catch lua exceptions.
authorRobin Gareus <robin@gareus.org>
Mon, 21 Mar 2016 20:39:11 +0000 (21:39 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 21 Mar 2016 20:39:11 +0000 (21:39 +0100)
gtk2_ardour/processor_box.cc

index c5428ae2e01dccedf81c712735e496089dd51864..c889d72e4a18f83c0a06b16f78bad20f8b094b1f 100644 (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;
 }