Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crash caused by app.getLocaleCountryCode() #32322

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Jan 3, 2022

Backport of #32256

See that PR for details.

Notes: Fixed a crash caused by app.getLocaleCountryCode().

CFLocaleGetValue() returned null and crashed the process when
app.getLocaleCountryCode() was run on a CircleCI metal resource class
macOS instance with Xcode 12.5.1. This change fixes that logic and adds
further checks to make the code future-proof.

Here too people are complaining that the returned country code migth be
null: https://stackoverflow.com/questions/15202454/nslocalecountrycode-returns-nil

Signed-off-by: Darshan Sen <darshan.sen@postman.com>
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jan 3, 2022
@trop trop bot added 17-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Jan 3, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jan 3, 2022
@zcbenz zcbenz merged commit 9ef50c0 into 17-x-y Jan 4, 2022
@zcbenz zcbenz deleted the trop/17-x-y-bp-fix-crash-caused-by-app-getlocalecountrycode--1641246922453 branch January 4, 2022 07:04
@release-clerk
Copy link

release-clerk bot commented Jan 4, 2022

Release Notes Persisted

Fixed a crash caused by app.getLocaleCountryCode().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants