add a check that unit_map.end() is invalid for dereference
Merge branch 'master' of git://github.com/wesnoth/wesnoth