Fix delete of uninitialized-pointer (good catch by decker2)
This commit is contained in:
parent
28b2e4c135
commit
e858ab67c8
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue