13
0

Add an exception handler for access_action() used by control surfaces and Lua.

This commit is contained in:
Ben Loftis 2019-03-19 11:52:19 -05:00
parent 957393c435
commit 21e2b353c1

View File

@ -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<Action> 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;
}
}