From e424d432a2acb53e5e69804b3b06ec00f2a71b60 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 25 Feb 2016 13:30:02 +0100 Subject: [PATCH] Cleanups --- menu/menu_animation.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/menu/menu_animation.c b/menu/menu_animation.c index 790c6fc899..94820ae094 100644 --- a/menu/menu_animation.c +++ b/menu/menu_animation.c @@ -294,7 +294,7 @@ static float easing_out_in_bounce(float t, float b, float c, float d) static int menu_animation_iterate(menu_animation_t *anim, unsigned idx, float dt, unsigned *active_tweens) { - struct tween *tween = anim ? &anim->list[idx] : NULL; + struct tween *tween = &anim->list[idx]; if (!tween || !tween->alive) return -1; @@ -661,8 +661,11 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data) if (!dt) return false; - for(i = 0; i < anim->size; i++) - menu_animation_iterate(anim, i, *dt, &active_tweens); + if (anim) + { + for(i = 0; i < anim->size; i++) + menu_animation_iterate(anim, i, *dt, &active_tweens); + } if (!active_tweens) {