[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:
parent
181ba67114
commit
6825b9db1c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user