summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-03-21 21:39:11 +0100
committerRobin Gareus <robin@gareus.org>2016-03-21 21:39:11 +0100
commitea354226c19c65c81e4b0685caef1d0e5d005eab (patch)
tree49f37ca1a3f90a7fa41f82eb6d16a3201ce32e00 /gtk2_ardour
parent850d793c00d7e89395b5890557f28a5b807434ec (diff)
catch lua exceptions.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/processor_box.cc12
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;
}