Merge pull request #2561 from secondlife/brad/2553-about-sl-crash-locale-init

secondlife/viewer#2553 about sl crash locale init
meow-7.2.2
Brad Linden 2024-09-12 15:27:26 -07:00 committed by GitHub
commit a3f6f98f1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -1410,6 +1410,14 @@ bool LLStringUtil::simpleReplacement(std::string &replacement, std::string token
template<>
void LLStringUtil::setLocale(std::string inLocale)
{
if(startsWith(inLocale, "MissingString"))
{
// it seems this hasn't been working for some time, and I'm not sure how it is intentded to
// properly discover the correct locale. early out now to avoid failures later in
// formatNumber()
LL_WARNS() << "Failed attempting to set invalid locale: " << inLocale << LL_ENDL;
return;
}
sLocale = inLocale;
};