From 0ebf2d00b0ab9ebfeae1d25583df33d6ca58d604 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Tue, 30 Aug 2016 18:45:22 +0200 Subject: [PATCH] Fix NRE in SmudgeLayer.AddSmudge --- OpenRA.Mods.Common/Traits/World/SmudgeLayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/World/SmudgeLayer.cs b/OpenRA.Mods.Common/Traits/World/SmudgeLayer.cs index 2d42270d0d..f12873d3a0 100644 --- a/OpenRA.Mods.Common/Traits/World/SmudgeLayer.cs +++ b/OpenRA.Mods.Common/Traits/World/SmudgeLayer.cs @@ -151,7 +151,7 @@ namespace OpenRA.Mods.Common.Traits else { // Existing smudge; make it deeper - var tile = dirty.ContainsKey(loc) ? dirty[loc] : tiles[loc]; + var tile = dirty.ContainsKey(loc) && dirty[loc].Sprite != null ? dirty[loc] : tiles[loc]; var maxDepth = smudges[tile.Type].Length; if (tile.Depth < maxDepth - 1) {