@@ -270,13 +270,15 @@ CommandCost CmdBuildRailWaypoint(TileInd
/* check if we want to expand an already existing waypoint? */
if (wp->train_station.tile != INVALID_TILE) {
CommandCost ret = CanExpandRailStation(wp, new_location, axis);
if (ret.Failed()) return ret;
}
if (!wp->rect.BeforeAddRect(start_tile, width, height, StationRect::ADD_TEST)) return CMD_ERROR;
CommandCost ret = wp->rect.BeforeAddRect(start_tile, width, height, StationRect::ADD_TEST);
ret.SetGlobalErrorMessage();
} else {
/* allocate and initialize new waypoint */
if (!Waypoint::CanAllocateItem()) return_cmd_error(STR_ERROR_TOO_MANY_STATIONS_LOADING);
if (flags & DC_EXEC) {