mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 16:34:10 +00:00
animator: fix crash when setting keys on running animator
When inserting or modifying keys of a running animator the internal iterators per property could go out of sync. Reinitializing the iterators if the timeline is running avoids this.
This commit is contained in:
parent
0ff02d18d2
commit
d45395d78b
@ -1259,6 +1259,10 @@ clutter_animator_set_key_internal (ClutterAnimator *animator,
|
||||
|
||||
priv->score = g_list_insert_sorted (priv->score, key,
|
||||
sort_actor_prop_progress_func);
|
||||
|
||||
/* if the animator is already running reinitialize internal iterators */
|
||||
if (clutter_timeline_is_playing (priv->timeline))
|
||||
animation_animator_started (priv->timeline, animator);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user