Fix crash reported in #6805:
* check if we actually have a selected item git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39382 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -378,9 +378,14 @@ LocaleWindow::MessageReceived(BMessage* message)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
BListView* conventionsList = static_cast<BListView*>(listView);
|
BListView* conventionsList = static_cast<BListView*>(listView);
|
||||||
|
if (conventionsList == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
LanguageListItem* item = static_cast<LanguageListItem*>
|
LanguageListItem* item = static_cast<LanguageListItem*>
|
||||||
(conventionsList->ItemAt(conventionsList->CurrentSelection()));
|
(conventionsList->ItemAt(conventionsList->CurrentSelection()));
|
||||||
|
if (item == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
BFormattingConventions conventions(item->ID());
|
BFormattingConventions conventions(item->ID());
|
||||||
gMutableLocaleRoster->SetDefaultFormattingConventions(conventions);
|
gMutableLocaleRoster->SetDefaultFormattingConventions(conventions);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user