From 45921ff6f88ad0c76a9afb0547e321b46e10e418 Mon Sep 17 00:00:00 2001 From: Tomáš Znamenáček Date: Thu, 8 Jan 2015 12:58:56 +0100 Subject: MASShortcutMonitor will silently skip nil shortcuts passed to unregisterShortcut:. --- Framework/MASShortcutMonitor.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3