Avoid reading CenterPosition of invalid targets in DamageWarhead

Fixes #6642
This commit is contained in:
Oliver Brakmann
2014-10-03 13:56:57 +02:00
parent 9de79318e8
commit 8f8b0b966f

View File

@@ -71,7 +71,7 @@ namespace OpenRA.GameRules
// Used by traits that damage a single actor, rather than a position
if (target.Type == TargetType.Actor)
DoImpact(target.Actor, firedBy, damageModifiers);
else
else if (target.Type != TargetType.Invalid)
DoImpact(target.CenterPosition, firedBy, damageModifiers);
}