Counting should be done in reverse
Items are removed from the registeredAnimations array while the count goes up, this results into incorrect lookups in the array for nonexisting items
diff --git a/player/js/animation/AnimationManager.js b/player/js/animation/AnimationManager.js
index 65e2bec..6f067d8 100644
--- a/player/js/animation/AnimationManager.js
+++ b/player/js/animation/AnimationManager.js
@@ -144,7 +144,7 @@
function destroy(animation) {
var i;
- for(i=0;i<len;i+=1){
+ for(i=(len-1);i>=0;i-=1){
registeredAnimations[i].animation.destroy(animation);
}
}