* be_locale_roster->GetLanguage may fail. Fixes CID 2002.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37952 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5393193d0a
commit
456d57afb2
@ -1077,13 +1077,19 @@ AboutView::_CreateCreditsView()
|
|||||||
sortedTranslations.SortItems(TranslationComparator);
|
sortedTranslations.SortItems(TranslationComparator);
|
||||||
|
|
||||||
for (uint32 i = 0; i < kNumberOfTranslations; i ++) {
|
for (uint32 i = 0; i < kNumberOfTranslations; i ++) {
|
||||||
const Translation& translation =
|
const Translation& translation
|
||||||
*(const Translation*)sortedTranslations.ItemAt(i);
|
= *(const Translation*)sortedTranslations.ItemAt(i);
|
||||||
|
|
||||||
be_locale_roster->GetLanguage(translation.languageCode, &lang);
|
|
||||||
langName.Truncate(0);
|
langName.Truncate(0);
|
||||||
lang->GetTranslatedName(langName);
|
if (be_locale_roster->GetLanguage(translation.languageCode, &lang)
|
||||||
delete lang;
|
== B_OK) {
|
||||||
|
lang->GetTranslatedName(langName);
|
||||||
|
delete lang;
|
||||||
|
} else {
|
||||||
|
// We failed to get the localized readable name,
|
||||||
|
// go with what we have.
|
||||||
|
langName.Append(translation.languageCode);
|
||||||
|
}
|
||||||
|
|
||||||
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
fCreditsView->SetFontAndColor(&font, B_FONT_ALL, &kHaikuGreen);
|
||||||
fCreditsView->Insert("\n");
|
fCreditsView->Insert("\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user