summaryrefslogtreecommitdiff
path: root/src/train_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r--src/train_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp
index 458b51a43..9f0373065 100644
--- a/src/train_gui.cpp
+++ b/src/train_gui.cpp
@@ -26,7 +26,7 @@ void CcBuildWagon(bool success, TileIndex tile, uint32 p1, uint32 p2)
const Vehicle *found = NULL;
const Train *t;
FOR_ALL_TRAINS(t) {
- if (IsFrontEngine(t) && t->tile == tile &&
+ if (t->IsFrontEngine() && t->tile == tile &&
t->track == TRACK_BIT_DEPOT) {
if (found != NULL) return; // must be exactly one.
found = t;