diff options
author | Dessie Linden <dessie@lindenlab.com> | 2010-06-23 10:46:05 -0700 |
---|---|---|
committer | Dessie Linden <dessie@lindenlab.com> | 2010-06-23 10:46:05 -0700 |
commit | 6c57abb295447f2b44eb833cb77fa718dc2b1118 (patch) | |
tree | 0d9e147ed0b6bbde05e7b9550386114a13416c10 /indra/llcommon | |
parent | 87082996e6408919591ee3d408918a4425494dc9 (diff) | |
parent | af914e4ab666aad041aa17f6459d1ff834440b44 (diff) |
Merged from q/viewer-release
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/llstring.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f14d947734..1561bda201 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -994,7 +994,14 @@ void LLStringUtil::formatNumber(std::string& numStr, std::string decimals) convertToS32 (decimals, intDecimals); if (!sLocale.empty()) { - strStream.imbue (std::locale(sLocale.c_str())); + // std::locale() throws if the locale is unknown! (EXT-7926) + try + { + strStream.imbue(std::locale(sLocale.c_str())); + } catch (const std::exception &) + { + LL_WARNS_ONCE("Locale") << "Cannot set locale to " << sLocale << LL_ENDL; + } } if (!intDecimals) |