Merge pull request #112899 from timothyqiu/empty-locale

Prevent the main locale from being set to an empty string
This commit is contained in:
Thaddeus Crews 2025-11-18 08:25:39 -06:00
commit 3a3af8d806
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -464,6 +464,8 @@ String TranslationServer::get_country_name(const String &p_country) const {
}
void TranslationServer::set_locale(const String &p_locale) {
ERR_FAIL_COND_MSG(p_locale.is_empty(), "Locale cannot be an empty string.");
String new_locale = standardize_locale(p_locale);
if (locale == new_locale) {
return;