From fb745cc5a882cd4e3a49ff1f565cb69a65575993 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 19 Aug 2017 01:05:18 +0200 Subject: Lua may call C++ functions with throw. Catch them --- libs/ardour/luaproc.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libs/ardour/luaproc.cc') diff --git a/libs/ardour/luaproc.cc b/libs/ardour/luaproc.cc index 6581743771..c1fd455cdf 100644 --- a/libs/ardour/luaproc.cc +++ b/libs/ardour/luaproc.cc @@ -238,8 +238,7 @@ LuaProc::load_script () try { lua_dsp_init (_session.nominal_frame_rate ()); } catch (luabridge::LuaException const& e) { - ; - } + } catch (...) { } } _ctrl_params.clear (); @@ -354,6 +353,8 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan } } catch (luabridge::LuaException const& e) { _iotable = NULL; + } catch (...) { + _iotable = NULL; } } @@ -584,6 +585,8 @@ LuaProc::configure_io (ChanCount in, ChanCount out) std::cerr << "LuaException: " << e.what () << "\n"; #endif return false; + } catch (...) { + return false; } } } @@ -734,6 +737,8 @@ LuaProc::connect_and_run (BufferSet& bufs, std::cerr << "LuaException: " << e.what () << "\n"; #endif return -1; + } catch (...) { + return -1; } #ifdef WITH_LUAPROC_STATS int64_t t1 = g_get_monotonic_time (); -- cgit v1.2.3