From 3d8d1161061687fa0b04b7cd7619bf045278f276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Wed, 27 Feb 2013 18:32:32 +0100 Subject: [PATCH] fix NullReferenceException in UnHideActor --- OpenRA.Game/Traits/World/Shroud.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Game/Traits/World/Shroud.cs b/OpenRA.Game/Traits/World/Shroud.cs index 751f80c8fb..6392caef4c 100644 --- a/OpenRA.Game/Traits/World/Shroud.cs +++ b/OpenRA.Game/Traits/World/Shroud.cs @@ -137,6 +137,9 @@ namespace OpenRA.Traits if (a.Owner.World.LocalPlayer == null || a.Owner.Stances[a.Owner.World.LocalPlayer] == Stance.Ally) return; + if (v == null) + return; + foreach (var p in v.vis) foreach (var q in FindVisibleTiles(a.World, p, range)) foggedCells[q.X, q.Y] = exploredCells[q.X, q.Y];