[actor] Unrealize on destroy

If the application code calls for destruction of an actor we need
to make sure that the actor is unrealized before running the dispose
sequence; otherwise, we might trigger an assertion failure on composite
actors.
This commit is contained in:
Emmanuele Bassi 2009-06-03 12:59:16 +01:00
parent 181ba67114
commit 6825b9db1c

View File

@ -4269,6 +4269,11 @@ clutter_actor_destroy (ClutterActor *self)
{
CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IN_DESTRUCTION);
/* if we are destroying we want to unrealize ourselves
* first before the dispose run removes the parent
*/
clutter_actor_update_map_state (self, MAP_STATE_MAKE_UNREALIZED);
g_object_run_dispose (G_OBJECT (self));
CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_IN_DESTRUCTION);