fix a potential NRE

This commit is contained in:
Matthias Mailänder
2015-05-25 16:26:14 +02:00
parent c7dc3737b1
commit dd5eca7d1d

View File

@@ -87,6 +87,9 @@ namespace OpenRA.Mods.Common.Widgets
var tile = world.Map.MapTiles.Value[cell];
var tileInfo = world.TileSet.GetTileInfo(tile);
if (tileInfo == null)
return false;
var terrainType = world.TileSet.TerrainInfo[tileInfo.TerrainType];
if (world.Map.MapResources.Value[cell].Type == ResourceType.ResourceType)