Fix DamageModifier crashes when an actor is demolished.
Demolish calls GetDamageModifier with a null Damage.
This commit is contained in:
@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
int IDamageModifier.GetDamageModifier(Actor attacker, Damage damage)
|
||||
{
|
||||
if (attacker.Owner.IsAlliedWith(self.Owner) && damage.Value < 0 && !Info.ModifyHealing)
|
||||
if (!Info.ModifyHealing && attacker.Owner.IsAlliedWith(self.Owner) && damage != null && damage.Value < 0)
|
||||
return FullDamage;
|
||||
|
||||
var world = self.World;
|
||||
|
||||
Reference in New Issue
Block a user