Fix crash if an entity has a sprite without animation.