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
@ -1407,7 +1407,7 @@ clutter_animator_remove_key_internal (ClutterAnimator *animator,
|
|||||||
|
|
||||||
priv = animator->priv;
|
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;
|
ClutterAnimatorKey *key = k->data;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user