diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index c0201ce051..7437b08734 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -652,7 +652,9 @@ namespace OpenRA.Mods.RA.AI if (owner.IsEmpty) return; if (!owner.TargetIsValid) { - owner.Target = owner.bot.FindClosestEnemy(AverageUnitsPosition(owner.units).Value.CenterPosition, WRange.FromCells(8)); + var circaPostion = AverageUnitsPosition(owner.units); + if (circaPostion == null) return; + owner.Target = owner.bot.FindClosestEnemy(circaPostion.Value.CenterPosition, WRange.FromCells(8)); if (owner.Target == null) {