From aacad61c29de5f9d702f84fc425a60561425ebac Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 1 Feb 2012 19:26:30 -0600 Subject: use g_clear_object() on the proxy_cancel field --- src/indicator-power.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/indicator-power.c b/src/indicator-power.c index c833673..6280d4c 100644 --- a/src/indicator-power.c +++ b/src/indicator-power.c @@ -845,11 +845,7 @@ service_proxy_cb (GObject *object, self->proxy = g_dbus_proxy_new_for_bus_finish (res, &error); - if (self->proxy_cancel != NULL) - { - g_object_unref (self->proxy_cancel); - self->proxy_cancel = NULL; - } + g_clear_object (&self->proxy_cancel); if (error != NULL) { -- cgit v1.2.3