bugfix, make sure hotkey->client map exists before registering shortcut

This commit is contained in:
ulf hammarqvist
2015-02-19 18:57:39 +01:00
parent ba68320fef
commit acef682a23

View File

@@ -200,7 +200,10 @@ namespace PreviewToy
{
previews[process.MainWindowHandle].SetLabel(process.MainWindowTitle);
string key = previews[process.MainWindowHandle].Text;
previews[process.MainWindowHandle].registerShortcut(flat_layout_shortcuts[key]);
string value;
if (flat_layout_shortcuts.TryGetValue(key, out value)){
previews[process.MainWindowHandle].registerShortcut(value);
}
refresh_client_window_locations(process);
}