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
This commit is contained in:
Kalev Lember 2013-05-01 15:14:13 +02:00
parent 8a7ee8afcb
commit 29498bb20a

View file

@ -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);