diff --git a/OpenRA.Game/Map/TileSet.cs b/OpenRA.Game/Map/TileSet.cs index 05ab4bb63c..fc3733597c 100644 --- a/OpenRA.Game/Map/TileSet.cs +++ b/OpenRA.Game/Map/TileSet.cs @@ -282,7 +282,10 @@ namespace OpenRA public TerrainTileInfo GetTileInfo(TerrainTile r) { - var tpl = Templates[r.Type]; + TerrainTemplateInfo tpl; + if (!Templates.TryGetValue(r.Type, out tpl)) + return null; + return tpl.Contains(r.Index) ? tpl[r.Index] : null; }