Merge pull request #8253 from Mailaender/editor-resource-brush-nre

Fixed a potential null reference exception during in-game editor resource placement
This commit is contained in:
Oliver Brakmann
2015-05-25 17:42:28 +02:00

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)