[gnome-control-center] user-accounts: fix crash for incompatible realmd version
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: fix crash for incompatible realmd version
- Date: Mon, 20 Aug 2012 18:10:52 +0000 (UTC)
commit a41624305039f7d3e0503e72ea63268da8b80242
Author: Ray Strode <rstrode redhat com>
Date: Mon Aug 20 13:52:49 2012 -0400
user-accounts: fix crash for incompatible realmd version
The version property may not be available if realmd is
version 0.1 (which lacked the property) or if other
properties changed signatures (causing gdbus to fail to load
cache any property)
This commit fixes a crash where property is NULL in those cases.
panels/user-accounts/um-realm-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/um-realm-manager.c b/panels/user-accounts/um-realm-manager.c
index f4fec71..301c905 100644
--- a/panels/user-accounts/um-realm-manager.c
+++ b/panels/user-accounts/um-realm-manager.c
@@ -243,10 +243,10 @@ um_realm_manager_new_finish (GAsyncResult *result,
}
version = um_realm_provider_get_version (self->provider);
- if (!version_compare (version, 0, 7)) {
+ if (version == NULL || !version_compare (version, 0, 7)) {
/* No need to bother translators with this temporary message */
g_set_error (error, UM_REALM_ERROR, UM_REALM_ERROR_GENERIC,
- "Unsupported version of realmd: %s", version);
+ "realmd version should be at least 0.7");
g_object_unref (self);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]