diff --git a/src/kits/locale/LocaleRoster.cpp b/src/kits/locale/LocaleRoster.cpp index 69abd879ab..1bb63bf868 100644 --- a/src/kits/locale/LocaleRoster.cpp +++ b/src/kits/locale/LocaleRoster.cpp @@ -513,9 +513,7 @@ BLocaleRoster::GetInstalledLanguages(BMessage *languages) const #undef REALLY_ALL_LANGUAGES #ifdef REALLY_ALL_LANGUAGES - // TODO: Using static variables here looks really weird, and is probably - // the reason why calling this method a second time will crash. - static const char* const* icuLocaleList = Locale::getISOLanguages(); + const char* const* icuLocaleList = Locale::getISOLanguages(); // Loop over the strings and add them to an std::set to remove duplicates for (i = 0; icuLocaleList[i]; i++) { @@ -523,7 +521,7 @@ BLocaleRoster::GetInstalledLanguages(BMessage *languages) const } #else int32_t localeCount; - static const Locale* icuLocaleList + const Locale* icuLocaleList = Locale::getAvailableLocales(localeCount); // Loop over the strings and add them to an std::set to remove duplicates