Add an exception handler for access_action() used by control surfaces and Lua.
This commit is contained in:
parent
957393c435
commit
21e2b353c1
@ -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)
|
ENSURE_GUI_THREAD (*this, &Editor::access_action, action_group, action_item)
|
||||||
|
|
||||||
RefPtr<Action> act;
|
RefPtr<Action> act;
|
||||||
act = ActionManager::get_action (action_group.c_str(), action_item.c_str());
|
try {
|
||||||
|
act = ActionManager::get_action (action_group.c_str(), action_item.c_str());
|
||||||
if (act) {
|
if (act) {
|
||||||
act->activate();
|
act->activate();
|
||||||
|
}
|
||||||
|
} catch ( ActionManager::MissingActionException const& e) {
|
||||||
|
cerr << "MissingActionException:" << e.what () << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user