From 1c7cb8368cb90a5e94daed132c6f49be40931c81 Mon Sep 17 00:00:00 2001 From: Yexo Date: Thu, 29 Jan 2009 16:14:46 +0000 Subject: (svn r15295) -Fix [FS#2591] (r15190): Towns tried to build roads outside the map. --- src/road.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/road.cpp b/src/road.cpp index f72440fef..4680911c3 100644 --- a/src/road.cpp +++ b/src/road.cpp @@ -26,6 +26,7 @@ bool IsPossibleCrossing(const TileIndex tile, Axis ax) RoadBits CleanUpRoadBits(const TileIndex tile, RoadBits org_rb) { + if (!IsValidTile(tile)) return ROAD_NONE; for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { const TileIndex neighbor_tile = TileAddByDiagDir(tile, dir); -- cgit v1.2.3-70-g09d2