mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-05 08:48:05 +02:00
libupower-glib: Fix error handling
In up_client_get_properties_sync(), don't set the passed GError** to NULL, instead set the actual pointed-to GError* to NULL by default. Fixes proper error reporting back to the client if something does fail.
This commit is contained in:
parent
ecc4e379cc
commit
03c4abbfb5
1 changed files with 2 additions and 1 deletions
|
|
@ -328,7 +328,8 @@ up_client_get_properties_sync (UpClient *client, GCancellable *cancellable, GErr
|
|||
if (!client->priv->prop_proxy)
|
||||
goto out;
|
||||
|
||||
error = NULL;
|
||||
if (error != NULL)
|
||||
*error = NULL;
|
||||
ret = dbus_g_proxy_call (client->priv->prop_proxy, "GetAll", error,
|
||||
G_TYPE_STRING, "org.freedesktop.UPower",
|
||||
G_TYPE_INVALID,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue