[gnome-control-center] common: Fix criticals when user language getting fails



commit 29498bb20a1fba10319a97713196d152e1c36b30
Author: Kalev Lember <kalevlember gmail com>
Date:   Wed May 1 15:14:13 2013 +0200

    common: Fix criticals when user language getting fails
    
    Handle the error case when the call to the accountservice dbus proxy
    object fails.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699378

 panels/common/cc-common-language.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/panels/common/cc-common-language.c b/panels/common/cc-common-language.c
index 3e0d272..9cfbc7f 100644
--- a/panels/common/cc-common-language.c
+++ b/panels/common/cc-common-language.c
@@ -505,7 +505,12 @@ get_lang_for_user_object_path (const char *path)
                g_error_free (error);
                return NULL;
        }
+
        props = g_dbus_proxy_get_cached_property (user, "Language");
+       if (props == NULL) {
+               g_object_unref (user);
+               return NULL;
+       }
        lang = g_variant_dup_string (props, NULL);
 
        g_variant_unref (props);


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