From 2b72b674c713c70fc91609f91fc4e51ccb6c7ec5 Mon Sep 17 00:00:00 2001 From: Patrick Parker Date: Fri, 30 Mar 2007 03:50:48 +0000 Subject: [PATCH] patch#707 (partial) - prevent accessing an invalidated iterator when removing enemy healers from potential healers (thanks silene) --- src/actions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions.cpp b/src/actions.cpp index 253490863e0..6b0da849020 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -1348,7 +1348,7 @@ void calculate_healing(display& disp, const gamemap& map, unit_map::iterator potential_healer = units.find(h_it->second); wassert(potential_healer != units.end()); if(teams[potential_healer->second.side()-1].is_enemy(side)) { - heal.cfgs.erase(h_it); + h_it = heal.cfgs.erase(h_it); } else { ++h_it; }