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:
Martin Pitt 2013-10-08 17:01:39 +02:00
parent ecc4e379cc
commit 03c4abbfb5

View file

@ -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,