common: Avoid crashing if a language doesn't have a display name

If for some reason we cannot translate a language name, then
we wouldn't have a display language.

https://bugzilla.redhat.com/show_bug.cgi?id=752806
This commit is contained in:
Bastien Nocera 2012-11-29 17:06:19 +01:00
parent 40d475c6c6
commit e851e426d0

View file

@ -242,11 +242,12 @@ filter_languages (GtkTreeModel *model,
filter_string = g_object_get_data (G_OBJECT (model), "filter-string");
if (filter_string == NULL) {
if (filter_string == NULL)
return TRUE;
}
gtk_tree_model_get (model, iter, DISPLAY_LOCALE_COL, &locale, -1);
if (locale == NULL)
return FALSE;
l = g_utf8_casefold (locale, -1);