[gtk+] Use g_clear_object in a few more places
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Use g_clear_object in a few more places
- Date: Mon, 25 Jul 2016 12:33:38 +0000 (UTC)
commit 8db8891c66e9b5dc07deba631f2facc9383b7c2e
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 25 08:32:08 2016 -0400
Use g_clear_object in a few more places
gtk/gtkwidget.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 8dacf44..a8ad232 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -12272,16 +12272,14 @@ gtk_widget_finalize (GObject *object)
g_free (priv->name);
- if (priv->accessible)
- g_object_unref (priv->accessible);
+ g_clear_object (&priv->accessible);
gtk_widget_clear_path (widget);
gtk_css_widget_node_widget_destroyed (GTK_CSS_WIDGET_NODE (priv->cssnode));
g_object_unref (priv->cssnode);
- if (priv->context)
- g_object_unref (priv->context);
+ g_clear_object (&priv->context);
_gtk_size_request_cache_free (&priv->requests);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]