Skip to content

Commit

Permalink
fix: guard against nil events (#981)
Browse files Browse the repository at this point in the history
closes #958
  • Loading branch information
ksqsf authored Sep 12, 2024
1 parent 67e87fb commit f6b0127
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 f6b0127

Please sign in to comment.