Fix delete of uninitialized-pointer (good catch by decker2)

This commit is contained in:
Rusty Russell 2006-04-09 10:18:59 +00:00
parent 28b2e4c135
commit e858ab67c8

View file

@ -780,7 +780,7 @@ battle_stats evaluate_battle_stats(const gamemap& map,
battle_context::battle_context(const gamemap& map, const std::vector<team>& teams, const std::map<gamemap::location,unit>& units,
const gamestatus& status, const game_data& gamedata,
const gamemap::location& attacker_loc, const gamemap::location& defender_loc,
const attack_type& attacker_weapon)
const attack_type& attacker_weapon): attacker_stats_(NULL), defender_stats_(NULL)
{
const unit& attacker = units.find(attacker_loc)->second;
const unit& defender = units.find(defender_loc)->second;