From 21e2b353c1dcb4b3d3b1177886044e54211d4c22 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 19 Mar 2019 11:52:19 -0500 Subject: [PATCH] Add an exception handler for access_action() used by control surfaces and Lua. --- gtk2_ardour/editor.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 377ea851da..63bf7f1e4a 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -1142,10 +1142,13 @@ Editor::access_action (const std::string& action_group, const std::string& actio ENSURE_GUI_THREAD (*this, &Editor::access_action, action_group, action_item) RefPtr act; - act = ActionManager::get_action (action_group.c_str(), action_item.c_str()); - - if (act) { - act->activate(); + try { + act = ActionManager::get_action (action_group.c_str(), action_item.c_str()); + if (act) { + act->activate(); + } + } catch ( ActionManager::MissingActionException const& e) { + cerr << "MissingActionException:" << e.what () << endl; } }