@ SuppressWarnings ( "all" ) @ Override public void startAnimation ( Animation animation ) { if ( animation != null && ( getAnimation ( ) == null || getAnimation ( ) . hasEnded ( ) ) ) { super . startAnimation ( animation ) ; } }
Adds additional checking whether animation is null before starting to play it