timeline: Check if the timeline is playing in do_tick

Check that the timeline is still playing before executing in
_clutter_timeline_do_tick. This fixes the possibility of receiving a
new-frame signal when stopping a timeline in response to a different
timeline's signal emission.
This commit is contained in:
Chris Lord 2011-01-18 15:48:29 +00:00
parent c61e22d067
commit bb41cb54cb

View File

@ -1253,6 +1253,14 @@ _clutter_timeline_do_tick (ClutterTimeline *timeline,
priv = timeline->priv;
/* Check the is_playing variable before performing the timeline tick.
* This is necessary, as if a timeline is stopped in response to a
* master-clock generated signal of a different timeline, this code can
* still be reached.
*/
if (!priv->is_playing)
return;
if (priv->waiting_first_tick)
{
priv->last_frame_time = tick_time;