[clutter] Use g_clear_object() instead of unref() + NULL
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Use g_clear_object() instead of unref() + NULL
- Date: Tue, 20 Mar 2012 11:22:31 +0000 (UTC)
commit 552a9496951e7f62729a79a3d57c82d3805f9519
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Mar 20 11:22:07 2012 +0000
Use g_clear_object() instead of unref() + NULL
clutter/clutter-actor.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index 16266f1..a092332 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]