aboutsummaryrefslogtreecommitdiffstats
path: root/Framework
diff options
context:
space:
mode:
authorTomáš Znamenáček2015-01-08 12:58:56 +0100
committerTomáš Znamenáček2015-01-08 12:58:56 +0100
commit45921ff6f88ad0c76a9afb0547e321b46e10e418 (patch)
tree4b221d16995e0a00c4151ccbbd67a0856e0fafc0 /Framework
parent9b919cba51e4cd11b0c4424930d6c18a1baec73c (diff)
downloadMASShortcut-45921ff6f88ad0c76a9afb0547e321b46e10e418.tar.bz2
MASShortcutMonitor will silently skip nil shortcuts passed to unregisterShortcut:.
Diffstat (limited to 'Framework')
-rw-r--r--Framework/MASShortcutMonitor.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Framework/MASShortcutMonitor.m b/Framework/MASShortcutMonitor.m
index cb89ce1..099f4b1 100644
--- a/Framework/MASShortcutMonitor.m
+++ b/Framework/MASShortcutMonitor.m
@@ -54,7 +54,9 @@ static OSStatus MASCarbonEventCallback(EventHandlerCallRef, EventRef, void*);
- (void) unregisterShortcut: (MASShortcut*) shortcut
{
- [_hotKeys removeObjectForKey:shortcut];
+ if (shortcut) {
+ [_hotKeys removeObjectForKey:shortcut];
+ }
}
- (void) unregisterAllShortcuts