[gnome-bluetooth] applet: Use g_clear_object()



commit d3464ecbdd907935e17b0718e15f7b74f3004838
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Sep 22 22:19:51 2013 +0200

    applet: Use g_clear_object()

 applet/bluetooth-applet.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/applet/bluetooth-applet.c b/applet/bluetooth-applet.c
index a71fbff..6341b7b 100644
--- a/applet/bluetooth-applet.c
+++ b/applet/bluetooth-applet.c
@@ -822,8 +822,7 @@ bluetooth_applet_create_device_from_iter (GtkTreeModel *model,
 
        if (dev->bdaddr == NULL || dev->alias == NULL ||
            (check_proxy != FALSE && proxy == NULL)) {
-               if (proxy != NULL)
-                       g_object_unref (proxy);
+               g_clear_object (&proxy);
                g_strfreev (uuids);
                bluetooth_simple_device_free (dev);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]