summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/yapf_road.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yapf/yapf_road.cpp b/src/yapf/yapf_road.cpp
index 2fe1e2374..9bc39c3bf 100644
--- a/src/yapf/yapf_road.cpp
+++ b/src/yapf/yapf_road.cpp
@@ -488,7 +488,8 @@ bool YapfFindNearestRoadDepot(const Vehicle *v, int max_distance, TileIndex *dep
/* handle the case when our vehicle is already in the depot tile */
if (IsRoadDepotTile(tile)) {
/* only what we need to return is the Depot* */
- return Depot::GetByTile(tile);
+ *depot_tile = tile;
+ return true;
}
/* default is YAPF type 2 */