Index: ui/base/l10n/l10n_util.cc |
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc |
index 86b29802dbda5328321337f145d49d6deb44e8fb..67cca7f45d0f33f957677f0ecf445cd44f45747f 100644 |
--- a/ui/base/l10n/l10n_util.cc |
+++ b/ui/base/l10n/l10n_util.cc |
@@ -246,6 +246,11 @@ bool IsLocaleAvailable(const std::string& locale) { |
if (!l10n_util::IsLocaleSupportedByOS(locale)) |
return false; |
+ // If the ResourceBundle is not yet initialized, return false to avoid the |
+ // CHECK failure in ResourceBundle::GetSharedInstance(). |
+ if (!ResourceBundle::HasSharedInstance()) |
+ return false; |
jungshik at Google
2013/04/16 20:04:55
With this, in https://codereview.chromium.org/1382
hshi1
2013/04/16 20:36:39
It seems very difficult to make LocaleDataPakExist
|
+ |
return ResourceBundle::GetSharedInstance().LocaleDataPakExists(locale); |
} |