Fix #7098, Fix #7061: Inverted test led to invalid iterator access.

pull/78/head
Peter Nelson 5 years ago committed by Charles Pigott
parent 1334cfb3e5
commit b6de8c0930

@ -313,7 +313,7 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
for (TileIndexSet::const_iterator it = ts.dirty_tiles.begin(); it != ts.dirty_tiles.end(); it++) {
MarkTileDirtyByTile(*it);
TileIndexToHeightMap::const_iterator new_height = ts.tile_to_new_height.find(tile);
if (new_height != ts.tile_to_new_height.end()) continue;
if (new_height == ts.tile_to_new_height.end()) continue;
MarkTileDirtyByTile(*it, 0, new_height->second);
}

Loading…
Cancel
Save