diff options
| author | Tomáš Znamenáček | 2015-01-08 12:58:56 +0100 | 
|---|---|---|
| committer | Tomáš Znamenáček | 2015-01-08 12:58:56 +0100 | 
| commit | 45921ff6f88ad0c76a9afb0547e321b46e10e418 (patch) | |
| tree | 4b221d16995e0a00c4151ccbbd67a0856e0fafc0 /Framework | |
| parent | 9b919cba51e4cd11b0c4424930d6c18a1baec73c (diff) | |
| download | MASShortcut-45921ff6f88ad0c76a9afb0547e321b46e10e418.tar.bz2 | |
MASShortcutMonitor will silently skip nil shortcuts passed to unregisterShortcut:.
Diffstat (limited to 'Framework')
| -rw-r--r-- | Framework/MASShortcutMonitor.m | 4 | 
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 | 
