From 8b0f2e14623a95f8d3231d7234773aa77cf04e45 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 23 Aug 2019 23:55:33 +0100 Subject: [PATCH] Fix NRE in SquadManagerBotModule. --- OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs index f23990bc78..3bc1d54b18 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/SquadManagerBotModule.cs @@ -116,7 +116,7 @@ namespace OpenRA.Mods.Common.Traits World = self.World; Player = self.Owner; - unitCannotBeOrdered = a => a.Owner != Player || a.IsDead || !a.IsInWorld; + unitCannotBeOrdered = a => a == null || a.Owner != Player || a.IsDead || !a.IsInWorld; } public bool IsEnemyUnit(Actor a)