[gnome-control-center] Prevent potential segfault



commit bc3307b4924dad50150acc67e96d74c9ebf3ee83
Author: Rui Matos <tiagomatos gmail com>
Date:   Sun Feb 17 00:42:18 2013 +0100

    Prevent potential segfault

 panels/common/cc-language-chooser.c |    2 +-
 panels/region/cc-format-chooser.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/common/cc-language-chooser.c b/panels/common/cc-language-chooser.c
index 158f0ea..59f55f9 100644
--- a/panels/common/cc-language-chooser.c
+++ b/panels/common/cc-language-chooser.c
@@ -67,7 +67,7 @@ set_locale_id (GtkDialog *chooser,
                 if (check == NULL || language == NULL)
                         continue;
 
-                if (strcmp (locale_id, language) == 0) {
+                if (g_strcmp0 (locale_id, language) == 0) {
                         gboolean is_extra;
                         gtk_image_set_from_icon_name (GTK_IMAGE (check), "object-select-symbolic", 
GTK_ICON_SIZE_MENU);
 
diff --git a/panels/region/cc-format-chooser.c b/panels/region/cc-format-chooser.c
index 2f96ee4..e09cf23 100644
--- a/panels/region/cc-format-chooser.c
+++ b/panels/region/cc-format-chooser.c
@@ -155,7 +155,7 @@ set_locale_id (GtkDialog   *chooser,
                 if (check == NULL || region == NULL)
                         continue;
 
-                if (strcmp (locale_id, region) == 0) {
+                if (g_strcmp0 (locale_id, region) == 0) {
                         gboolean is_extra;
 
                         /* mark as selected */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]