mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
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:
parent
c61e22d067
commit
bb41cb54cb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user