diff --git a/src/train_gui.cpp b/src/train_gui.cpp --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -28,7 +28,7 @@ void CcBuildWagon(bool success, TileInde FOR_ALL_VEHICLES(v) { if (v->type == VEH_TRAIN && IsFrontEngine(v) && v->tile == tile && - ((Train *)v)->u.rail.track == TRACK_BIT_DEPOT) { + ((Train *)v)->track == TRACK_BIT_DEPOT) { if (found != NULL) return; // must be exactly one. found = v; }