From 2f773e49efd5a73fe1ac8b174055889507cd16fb Mon Sep 17 00:00:00 2001 From: James Dunne Date: Sun, 24 Jun 2012 21:17:10 -0500 Subject: [PATCH] Fixed null ref exception while playing cnc. --- OpenRA.Mods.RA/Harvester.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Harvester.cs b/OpenRA.Mods.RA/Harvester.cs index 3d5ab4fbe9..cb12f4922e 100644 --- a/OpenRA.Mods.RA/Harvester.cs +++ b/OpenRA.Mods.RA/Harvester.cs @@ -166,7 +166,7 @@ namespace OpenRA.Mods.RA // I'm blocking someone else from moving to my location: Activity act = self.GetCurrentActivity(); // If I'm just waiting around then get out of the way: - if (act.GetType() == typeof(Wait)) + if (act == null || act.GetType() == typeof(Wait)) { self.CancelActivity(); var mobile = self.Trait();