Don't crash when trying to protect a harvester against a dead (not in world) enemy

This commit is contained in:
abcdefg30
2015-05-31 15:08:59 +02:00
parent c4d349ef2c
commit 1fe68a8ef4

View File

@@ -61,8 +61,8 @@ ProtectHarvester = function(unit)
local Guards = SetupAttackGroup() local Guards = SetupAttackGroup()
Utils.Do(Guards, function(unit) Utils.Do(Guards, function(unit)
if attacker.Location then if not self.IsDead then
unit.AttackMove(attacker.Location) unit.AttackMove(self.Location)
end end
IdleHunt(unit) IdleHunt(unit)
end) end)