[mutter] clutter/actor: Unref the root node if set as child
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/actor: Unref the root node if set as child
- Date: Mon, 4 Nov 2019 12:21:47 +0000 (UTC)
commit f133de2dd42f4a3f5bf66ef476ce956d2e4931c9
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Nov 4 12:51:43 2019 +0100
clutter/actor: Unref the root node if set as child
When setting the root node as child of a clip or transform node, we add a
new reference to it, without removing the one that we've previously added
when getting it from the actor node (and that won't ever be unset by the
auto-pointer since the root_node is re-associated).
So, once we add the root node as child and re-define it, unref it.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/908
clutter/clutter/clutter-actor.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index af9353e0e..a4214e6a4 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -3934,6 +3934,7 @@ clutter_actor_paint (ClutterActor *self)
clip_node = clutter_clip_node_new ();
clutter_paint_node_add_rectangle (clip_node, &clip);
clutter_paint_node_add_child (clip_node, root_node);
+ clutter_paint_node_unref (root_node);
root_node = g_steal_pointer (&clip_node);
}
@@ -3947,6 +3948,7 @@ clutter_actor_paint (ClutterActor *self)
transform_node = clutter_transform_node_new (&transform);
clutter_paint_node_add_child (transform_node, root_node);
+ clutter_paint_node_unref (root_node);
root_node = g_steal_pointer (&transform_node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]