Check for Carryall, RevealOnFire FrozenActor.Actor is null

This commit is contained in:
rob-v
2017-06-15 11:53:15 +02:00
committed by Paul Chote
parent 78bf530a4e
commit 7772ebedf4
2 changed files with 2 additions and 2 deletions

View File

@@ -288,7 +288,7 @@ namespace OpenRA.Mods.Common.Traits
static bool CanTarget(Actor self, Actor target)
{
if (!target.AppearsFriendlyTo(self))
if (target == null || !target.AppearsFriendlyTo(self))
return false;
var carryable = target.TraitOrDefault<Carryable>();

View File

@@ -68,7 +68,7 @@ namespace OpenRA.Mods.Common.Traits
{
if (target.Type == TargetType.Actor)
return target.Actor.Owner;
else if (target.Type == TargetType.FrozenActor && !target.FrozenActor.Actor.IsDead)
else if (target.Type == TargetType.FrozenActor && target.FrozenActor.Actor != null && !target.FrozenActor.Actor.IsDead)
return target.FrozenActor.Actor.Owner;
return null;