diff --git a/atom/browser/api/atom_api_shortcut.cc b/atom/browser/api/atom_api_shortcut.cc index d752b453dd..0613215e48 100644 --- a/atom/browser/api/atom_api_shortcut.cc +++ b/atom/browser/api/atom_api_shortcut.cc @@ -63,8 +63,9 @@ void Shortcut::Register() { OnFailed("Shortcut is invalid."); return; } - GlobalShortcutListener::GetInstance()->RegisterAccelerator( - accelerator_, this); + if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator( + accelerator_, this)) + OnFailed("Fail to register the shortcut."); } void Shortcut::Unregister() {