No targets crash

There is a slight chance after a battle when an enemy is killed (last stand) your next creature will get another turn. If you press attack the game will crash. If you press defend the battle ends normally.
A check if all creatures are dead when you press attack would fix this.
It would also be nice if last stand didn’t attack creatures that are already dead.