# HG changeset patch # User frosch # Date 1280903240 0 # Node ID 4363493b3838f5486b40a3271434b79f37220b23 # Parent b1af6b1e509da77a54679b1e27be1cfb78f71c1c (svn r20357) -Fix (r20356): Call GetAllRoadBits() only if there is road. diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -862,7 +862,7 @@ } else { bool build_over_road = is_drive_through && IsNormalRoadTile(cur_tile); /* Road bits in the wrong direction. */ - RoadBits rb = GetAllRoadBits(cur_tile); + RoadBits rb = IsNormalRoadTile(cur_tile) ? GetAllRoadBits(cur_tile) : ROAD_NONE; if (build_over_road && (rb & (axis == AXIS_X ? ROAD_Y : ROAD_X)) != 0) { /* Someone was pedantic and *NEEDED* three fracking different error messages. */ switch (CountBits(rb)) {