diff --git a/src/preferences/locale/LocaleWindow.cpp b/src/preferences/locale/LocaleWindow.cpp index 6e4af0b055..5ba2200f3e 100644 --- a/src/preferences/locale/LocaleWindow.cpp +++ b/src/preferences/locale/LocaleWindow.cpp @@ -378,9 +378,14 @@ LocaleWindow::MessageReceived(BMessage* message) break; BListView* conventionsList = static_cast(listView); + if (conventionsList == NULL) + break; LanguageListItem* item = static_cast (conventionsList->ItemAt(conventionsList->CurrentSelection())); + if (item == NULL) + break; + BFormattingConventions conventions(item->ID()); gMutableLocaleRoster->SetDefaultFormattingConventions(conventions);