mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-01-01 05:40:07 +01:00
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:
parent
e96f5349f9
commit
0d64bbddaa
1 changed files with 3 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue