[gnome-bluetooth/wip/fixes] chooser-button: use g_clear_object
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/fixes] chooser-button: use g_clear_object
- Date: Thu, 18 Dec 2014 19:41:00 +0000 (UTC)
commit eb47a3d6e6ff3a6d6bab6a2125292f9cc308bc1b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Dec 18 20:40:44 2014 +0100
chooser-button: use g_clear_object
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]