animator: avoid walking off empty list
When removing the last key in a list, the last part of the for statement could cause dereferencing (NULL)->next and thus segfaulting.
This commit is contained in:
parent
698cce8276
commit
35c6179a8e
1 changed files with 1 additions and 1 deletions
|
@ -1407,7 +1407,7 @@ clutter_animator_remove_key_internal (ClutterAnimator *animator,
|
|||
|
||||
priv = animator->priv;
|
||||
|
||||
for (k = priv->score; k != NULL; k = k->next)
|
||||
for (k = priv->score; k != NULL; k = k?k->next:NULL)
|
||||
{
|
||||
ClutterAnimatorKey *key = k->data;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue