omidahourai / AK-Tween

A Corona library for Predeterminite Tweening. This will help boost performance of your app if you have a lot of transitions that don't require runtime calculation (for example, character part animations).
4 stars 1 forks source link

finishTween may remove incorrect tweens #5

Open krstns opened 11 years ago

krstns commented 11 years ago

Because you are using table.remove without checking if table.indexOf returned value, if you call finishTween() on a tween which was not playing, you will remove the last tween in registered table. To resolve this issue you'll have to check if indexOf returned value before calling table.remove.