Skip to content

Commit

Permalink
fix: guard against nil events
Browse files Browse the repository at this point in the history
closes #958
  • Loading branch information
ksqsf committed Sep 12, 2024
1 parent 67e87fb commit 5c98d78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sources/SquirrelInputController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ final class SquirrelInputController: IMKInputController {

// swiftlint:disable:next cyclomatic_complexity
override func handle(_ event: NSEvent!, client sender: Any!) -> Bool {
guard let event = event else { return false }
let modifiers = event.modifierFlags
let changes = lastModifiers.symmetricDifference(modifiers)

Expand Down

0 comments on commit 5c98d78

Please sign in to comment.