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:
parent
8a7ee8afcb
commit
29498bb20a
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue