aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indicator-power.c6
1 files changed, 1 insertions, 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)
{