summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-01-29 16:14:46 +0000
committerYexo <yexo@openttd.org>2009-01-29 16:14:46 +0000
commit1c7cb8368cb90a5e94daed132c6f49be40931c81 (patch)
treeed68ce9c099b5df6ea8f9e3aac89996f672dbdb9 /src
parent627d54a08119b3df2109e2857b2024cf82124b6b (diff)
downloadopenttd-1c7cb8368cb90a5e94daed132c6f49be40931c81.tar.xz
(svn r15295) -Fix [FS#2591] (r15190): Towns tried to build roads outside the map.
Diffstat (limited to 'src')
-rw-r--r--src/road.cpp1
1 files changed, 1 insertions, 0 deletions
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);