wesnoth/wesnoth-old — pull request #3 by vinipsmaker (2013-05-02 03:06:34+00:00)
Title: Fixes bug #20765

The change is small, but it took some time to hunt this bug down.

....

A call to unit::redraw_unit would check if the unit contains any animation. If
no animation is found, then it would call set_standing to put a new animation.

States are usually changed through unit::start_animation. unit::set_standing
uses this approach also. If unit::start_animation is unable to change the unit
to the animation passed as argument, it would try to animate the object calling
unit::set_standing (infinite recursion).

unit::start_animation had a check (maybe to prevent the infinite recursion), but
this check was buggy (if the intent was to prevent the infinite recursion).

The solution add a instruction to successfully set the unit to the state
STATE_STANDING and fixes the check that was using the wrong logical operator.