From 35c6179a8e01ca02ee3239ec8e4a0379e41ada09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 16 Jun 2010 17:43:44 +0100 Subject: [PATCH] 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. --- clutter/clutter-animator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c index 0c3287ac5..e81e5dd40 100644 --- a/clutter/clutter-animator.c +++ b/clutter/clutter-animator.c @@ -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;