Bugfix #1007843 method clean up by ricotz

This commit is contained in:
Garden Gnome 2012-06-03 21:46:04 +01:00
parent feafb53f59
commit 4d29e6bb5b

View File

@ -506,14 +506,13 @@ namespace Gala
void clutter_actor_reparent (Clutter.Actor actor, Clutter.Actor new_parent) void clutter_actor_reparent (Clutter.Actor actor, Clutter.Actor new_parent)
{ {
Clutter.Actor actor_tmp, old_parent; if (actor == new_parent)
return;
if (actor == new_parent) return; actor.ref ();
actor_tmp = actor; actor.get_parent ().remove_child (actor);
new_parent.add_child (actor);
old_parent = actor.get_parent (); actor.unref ();
old_parent.remove_child (actor);
new_parent.add_child (actor_tmp);
} }
[CCode (cname="clutter_x11_handle_event")] [CCode (cname="clutter_x11_handle_event")]