Files
ghostty/src/os
Jared Gizersky 3548acfac6 os: handle nil languageCode/countryCode in setLangFromCocoa (#9290)
Fixes a crash when NSLocale returns nil for languageCode or countryCode
properties. This can happen when the app launches without locale
environment variables set.

The crash occurs at `src/os/locale.zig:87-88` when trying to call
`getProperty()` on a nil object. The fix adds a null check and falls
back to `en_US.UTF-8` instead of dereferencing null.

## Testing
Tested by running with locale variables unset:
```bash
unset LC_ALL && ./zig-out/Ghostty.app/Contents/MacOS/ghostty
```

Before: segmentation fault  
After: launches successfully with fallback locale
2025-10-20 20:27:04 -07:00
..
2024-08-16 10:57:19 -07:00
2025-05-26 21:50:14 -06:00
2025-03-12 16:29:17 -07:00
2025-06-07 14:34:55 -05:00
2025-06-21 14:11:50 -07:00
2024-01-14 14:48:56 -08:00
2025-10-03 07:10:43 -07:00
2025-03-12 15:46:15 -07:00
2025-03-12 16:29:17 -07:00