This repository has no description
Something went wrong. Try again.
os: handle nil languageCode/countryCode in setLangFromCocoa (#9290) master
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
Author Jared Gizersky Committer GitHub Date (Oct 21, 2025, 3:27 AM UTC) Commit 3548acfa 3548acfac63e7674b5e25896f6b393474fe8ea65 Parent da165fc3 da165fc3cf6f8ef514f8f7b52c5bdb080509aa74