[gnome-control-center] region: Clear input chooser rows instead of unrefing them



commit bd6347d02a52aa3875e349456ef528ead77ee5d2
Author: Joaquim Rocha <me joaquimrocha com>
Date:   Tue Feb 24 21:21:51 2015 +0100

    region: Clear input chooser rows instead of unrefing them
    
    These changes prevent warnings when unreferencing the default input
    source, locale and back rows which are never instanced by some locales
    (and thus null).

 panels/region/cc-input-chooser.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/region/cc-input-chooser.c b/panels/region/cc-input-chooser.c
index b0e0676..3f1fb72 100644
--- a/panels/region/cc-input-chooser.c
+++ b/panels/region/cc-input-chooser.c
@@ -95,9 +95,9 @@ locale_info_free (gpointer data)
   g_free (info->name);
   g_free (info->unaccented_name);
   g_free (info->untranslated_name);
-  g_object_unref (info->default_input_source_row);
-  g_object_unref (info->locale_row);
-  g_object_unref (info->back_row);
+  g_clear_object (&info->default_input_source_row);
+  g_clear_object (&info->locale_row);
+  g_clear_object (&info->back_row);
   g_hash_table_destroy (info->layout_rows_by_id);
   g_hash_table_destroy (info->engine_rows_by_id);
   g_free (info);


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