Commit 0d11b245 authored by Sam Thursfield's avatar Sam Thursfield

Avoid g_critical() errors when unable to connect to upower

This removes two g_critical() errors that are seen when running the
tests in CI.

Before:

    (tracker-miner-fs:7050): libupower-glib-WARNING **: 14:31:50.109: Couldn't connect to proxy: Could not connect: No such file or directory

    (tracker-miner-fs:7050): GLib-GObject-CRITICAL **: 14:31:50.109: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

    (tracker-miner-fs:7050): GLib-GObject-CRITICAL **: 14:31:50.109: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

    ** (tracker-miner-fs:7050): WARNING **: 14:31:50.109: Unable to connect to UPower

After:

    (tracker-miner-fs:12620): libupower-glib-WARNING **: 14:38:52.337: Couldn't connect to proxy: Could not connect: No such file or directory

    ** (tracker-miner-fs:12620): WARNING **: 14:38:52.337: Unable to connect to UPower

Fixes GNOME/tracker-miners#75
parent acb65649
......@@ -170,10 +170,10 @@ tracker_power_finalize (GObject *object)
priv = GET_PRIV (object);
#ifndef HAVE_UP_CLIENT_GET_ON_LOW_BATTERY
g_object_unref (priv->composite_device);
g_clear_object (&priv->composite_device);
#endif /* HAVE_UP_CLIENT_GET_ON_LOW_BATTERY */
g_object_unref (priv->client);
g_clear_object (&priv->client);
(G_OBJECT_CLASS (tracker_power_parent_class)->finalize) (object);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment