lib: Fix segfault on getting property when daemon is not running

This fixes "upower --version" when the daemon is not running, and thus the
client proxy is NULL.
This commit is contained in:
Martin Pitt 2013-11-08 14:59:50 +01:00
parent e96f5349f9
commit 0d64bbddaa

View file

@ -322,6 +322,9 @@ up_client_get_property (GObject *object,
UpClient *client;
client = UP_CLIENT (object);
if (client->priv->proxy == NULL)
return;
switch (prop_id) {
case PROP_DAEMON_VERSION:
g_value_set_string (value, up_client_glue_get_daemon_version (client->priv->proxy));