[gnome-control-center/gnome-3-6] 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-6] common: Avoid crashing if a language doesn't have a display name
- Date: Thu, 29 Nov 2012 16:09:49 +0000 (UTC)
commit d0157fed0e45db20d896e6f8c12d74c0db67563b
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 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 78d0a7a..bd0ea54 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -244,13 +244,14 @@ 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;
- }
gdk_threads_enter ();
gtk_tree_model_get (model, iter, DISPLAY_LOCALE_COL, &locale, -1);
gdk_threads_leave ();
+ if (locale == NULL)
+ return FALSE;
l = g_utf8_casefold (locale, -1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]