strictness: getZoneSizeFor must be called on a zone-center tile

git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@844 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
jason@long.name 2013-09-05 11:23:07 +00:00
parent 94e9892731
commit c3e677047a

View file

@ -398,11 +398,10 @@ public class TileConstants
public static CityDimension getZoneSizeFor(int tile)
{
assert isZoneCenter(tile);
TileSpec spec = Tiles.get(tile & LOMASK);
if (spec.owner != null) {
spec = spec.owner;
}
return spec.getBuildingSize();
return spec != null ? spec.getBuildingSize() : null;
}
public static boolean isConstructed(int tile)