From 552a9496951e7f62729a79a3d57c82d3805f9519 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 20 Mar 2012 11:22:07 +0000 Subject: [PATCH] Use g_clear_object() instead of unref() + NULL --- clutter/clutter-actor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 16266f110..a0923322d 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -3180,8 +3180,7 @@ add_or_remove_flatten_effect (ClutterActor *self) /* Destroy the effect so that it will lose its fbo cache of the actor */ _clutter_actor_remove_effect_internal (self, priv->flatten_effect); - g_object_unref (priv->flatten_effect); - priv->flatten_effect = NULL; + g_clear_object (&priv->flatten_effect); } } } @@ -15907,7 +15906,7 @@ clutter_actor_set_layout_manager (ClutterActor *self, G_CALLBACK (on_layout_manager_changed), self); clutter_layout_manager_set_container (priv->layout_manager, NULL); - g_object_unref (priv->layout_manager); + g_clear_object (&priv->layout_manager); } priv->layout_manager = manager; @@ -17599,7 +17598,7 @@ clutter_actor_set_content (ClutterActor *self, if (priv->content != NULL) { _clutter_content_detached (priv->content, self); - g_object_unref (priv->content); + g_clear_object (&priv->content); } priv->content = content;