2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 891 - assertion failed when test-behave exits * clutter/clutter-behaviour.c: (remove_actor_on_destroy), (clutter_behaviour_apply), (clutter_behaviour_remove): Remove the actor if it gets destroyed before the behaviour.
This commit is contained in:
parent
9655f4d58c
commit
4b0a15c468
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2008-04-23 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
Bug 891 - assertion failed when test-behave exits
|
||||
|
||||
* clutter/clutter-behaviour.c:
|
||||
(remove_actor_on_destroy),
|
||||
(clutter_behaviour_apply),
|
||||
(clutter_behaviour_remove): Remove the actor if it gets
|
||||
destroyed before the behaviour.
|
||||
|
||||
2008-04-18 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
Bug #884 - Add clutter_alpha_set_closure
|
||||
|
@ -325,6 +325,13 @@ clutter_behaviour_init (ClutterBehaviour *self)
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
remove_actor_on_destroy (ClutterActor *actor,
|
||||
ClutterBehaviour *behaviour)
|
||||
{
|
||||
clutter_behaviour_remove (behaviour, actor);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_behaviour_apply:
|
||||
* @behave: a #ClutterBehaviour
|
||||
@ -356,6 +363,9 @@ clutter_behaviour_apply (ClutterBehaviour *behave,
|
||||
}
|
||||
|
||||
priv->actors = g_slist_prepend (priv->actors, g_object_ref (actor));
|
||||
g_signal_connect (actor, "destroy",
|
||||
G_CALLBACK (remove_actor_on_destroy),
|
||||
behave);
|
||||
|
||||
g_signal_emit (behave, behave_signals[APPLIED], 0, actor);
|
||||
}
|
||||
@ -411,6 +421,10 @@ clutter_behaviour_remove (ClutterBehaviour *behave,
|
||||
return;
|
||||
}
|
||||
|
||||
g_signal_handlers_disconnect_by_func (actor,
|
||||
G_CALLBACK (remove_actor_on_destroy),
|
||||
behave);
|
||||
|
||||
priv->actors = g_slist_remove (priv->actors, actor);
|
||||
|
||||
g_signal_emit (behave, behave_signals[REMOVED], 0, actor);
|
||||
|
Loading…
Reference in New Issue
Block a user