From 71dd84b9d56dbeb564c2ec072d160e0301718777 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 9 Mar 2019 17:54:13 +0000 Subject: [PATCH] Fix invalid target crash in SupportPowerManager.Activate. --- OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index 6a407916cc..de1f81752f 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -236,7 +236,7 @@ namespace OpenRA.Mods.Common.Traits var power = Instances.Where(i => !i.IsTraitPaused && !i.IsTraitDisabled) .MinByOrDefault(a => { - if (a.Self.OccupiesSpace == null) + if (a.Self.OccupiesSpace == null || order.Target.Type == TargetType.Invalid) return 0; return (a.Self.CenterPosition - order.Target.CenterPosition).HorizontalLengthSquared;