Check for invalid targets to avoid crashing.

This commit is contained in:
Matthias Mailänder
2016-03-28 10:20:30 +02:00
parent 27888715de
commit 133a0f54a3

View File

@@ -91,6 +91,9 @@ namespace OpenRA.Mods.Common.Warheads
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{
if (!target.IsValidFor(firedBy))
return;
var pos = target.CenterPosition;
var world = firedBy.World;
var targetTile = world.Map.CellContaining(pos);