don't crash when C4 target.Actor is null

closes #4975
This commit is contained in:
Matthias Mailänder
2014-04-01 07:40:22 +02:00
parent b82510023f
commit 3d6086187e

View File

@@ -93,7 +93,7 @@ namespace OpenRA.Mods.RA
public override bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor)
{
// TODO: Bridges don't yet support FrozenUnderFog.
if (target.Actor.HasTrait<BridgeHut>())
if (target.Actor != null && target.Actor.HasTrait<BridgeHut>())
return false;
return true;