[gnome-bluetooth] chooser-button: use g_clear_object



commit 34a1712edabf22647d238a8ef941450057d5b128
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Dec 18 20:40:44 2014 +0100

    chooser-button: use g_clear_object
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742359

 lib/bluetooth-chooser-button.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/lib/bluetooth-chooser-button.c b/lib/bluetooth-chooser-button.c
index 4c03a69..8f58786 100644
--- a/lib/bluetooth-chooser-button.c
+++ b/lib/bluetooth-chooser-button.c
@@ -257,10 +257,8 @@ bluetooth_chooser_button_finalize (GObject *object)
 {
        BluetoothChooserButton *button = BLUETOOTH_CHOOSER_BUTTON (object);
 
-       if (button->client != NULL) {
-               g_object_unref (button->client);
-               button->client = NULL;
-       }
+       g_clear_object (&button->client);
+
        if (button->dialog != NULL) {
                gtk_widget_destroy (button->dialog);
                button->dialog = NULL;


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