fix: crash on blacklisted app with main shortcut cleared
This commit is contained in:
1 parent
5d9bc8e6b7
commit
c3f0686fd1
1 file changed
+3
-2
@@ -55,8 +55,9 @@ class KeyboardEvents {
|
||||
if shouldDisable != App.app.globalShortcutsAreDisabled {
|
||||
let fn = shouldDisable ? unregisterHotKeyIfNeeded : registerHotKeyIfNeeded
|
||||
for shortcutId in globalShortcutsIds.keys {
|
||||
let shortcut = ControlsTab.shortcuts[shortcutId]!.shortcut
|
||||
fn(shortcutId, shortcut)
|
||||
if let shortcut = ControlsTab.shortcuts[shortcutId]?.shortcut {
|
||||
fn(shortcutId, shortcut)
|
||||
}
|
||||
}
|
||||
debugPrint("toggleGlobalShortcuts", shouldDisable)
|
||||
App.app.globalShortcutsAreDisabled = shouldDisable
|
||||
|
||||
Reference in new issue
Block a user