[gnome-control-center/gnome-3-4] common: Avoid crashing if a language doesn't have a display name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/gnome-3-4] common: Avoid crashing if a language doesn't have a display name
- Date: Thu, 29 Nov 2012 16:09:37 +0000 (UTC)
commit b3f5f677348be4c45665159fa7dc3e3c0892cb43
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 29 17:06:19 2012 +0100
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
Conflicts:
panels/common/cc-language-chooser.c
panels/common/cc-language-chooser.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 6f8e9ff..7062877 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -241,11 +241,13 @@ 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);
visible = strstr (l, filter_string) != NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]