[gnome-control-center] network: Simplify object destruction
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Simplify object destruction
- Date: Fri, 10 Mar 2017 18:19:13 +0000 (UTC)
commit b4ac30b51ef2124f0c846941cfa008f991c97a7c
Author: Bastien Nocera <hadess hadess net>
Date: Fri Mar 10 19:15:29 2017 +0100
network: Simplify object destruction
panels/network/net-device.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/net-device.c b/panels/network/net-device.c
index b98e686..95b556e 100644
--- a/panels/network/net-device.c
+++ b/panels/network/net-device.c
@@ -268,8 +268,7 @@ net_device_finalize (GObject *object)
g_signal_handler_disconnect (priv->nm_device,
priv->changed_id);
}
- if (priv->nm_device != NULL)
- g_object_unref (priv->nm_device);
+ g_clear_object (&priv->nm_device);
G_OBJECT_CLASS (net_device_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]