improve 2009-11-24T02:20:04Z!alinkmaze@gmail.com, always disable the old iterator.

This commit is contained in:
Ali El Gariani 2009-11-24 02:28:11 +00:00
parent 3f642a770f
commit 9b7173d1cf

View file

@ -2268,7 +2268,9 @@ size_t move_unit(move_unit_spectator *move_spectator,
//NOTE: an wml event may have removed the unit pointed by ui
unit_map::iterator maybe_ui = units.find(steps.back());
// and always disable the previous iterator
ui = units.end();
if (move_spectator!=NULL) {
move_spectator->set_unit(maybe_ui);
}