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.
This commit is contained in:
parent
daa8b098a4
commit
a416243050
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue