From c95d92c2ca3d0c40a06aae6947279b6a72bf7163 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Thu, 6 Jan 2011 15:33:55 +0000 Subject: [PATCH] Add a temp conditional to avoid exceptions when a command doesn't exist since the hotkeys aren't fully converted. Originally committed to SVN as r5134. --- aegisub/src/hotkey.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aegisub/src/hotkey.cpp b/aegisub/src/hotkey.cpp index 77cb77d51..41433481a 100644 --- a/aegisub/src/hotkey.cpp +++ b/aegisub/src/hotkey.cpp @@ -69,7 +69,10 @@ void check(std::string context, int key_code, wchar_t key_char, int modifier) { std::string command; if (agi::hotkey::hotkey->Scan(context, combo, command) == 0) { - (*cmd::get(command))(&wxGetApp().frame->temp_context); + /// The bottom line should be removed after all the hotkey commands are fixed. + /// This is to avoid pointless exceptions. + if (command.find("/") != std::string::npos) + (*cmd::get(command))(&wxGetApp().frame->temp_context); } }