summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);