Skip to content

Fix nil application crash in Hammerspoon resize#121

Merged
drn merged 1 commit intomasterfrom
drn/fix-hammerspoon-nil
Jan 29, 2026
Merged

Fix nil application crash in Hammerspoon resize#121
drn merged 1 commit intomasterfrom
drn/fix-hammerspoon-nil

Conversation

@drn
Copy link
Owner

@drn drn commented Jan 29, 2026

Summary

  • Add nil check for win:application() in isTerm() function
  • Prevents crash when macOS can't fetch NSRunningApplication for a process

Test plan

  • Trigger resize hotkey when application info is unavailable
  • Verify normal resize operations still work

🤖 Generated with Claude Code

`win:application()` can return nil when macOS fails to fetch the
NSRunningApplication for a process. Add nil check before calling
`:title()` to prevent the error.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@drn drn merged commit 6c082cf into master Jan 29, 2026
2 checks passed
@drn drn deleted the drn/fix-hammerspoon-nil branch January 29, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant