summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/articulated_vehicles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index 1407ad9d3..d01118acf 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -333,7 +333,7 @@ void AddArticulatedParts(Vehicle *first, VehicleType type)
RoadVehicle *front = (RoadVehicle *)v;
RoadVehicle *rv = new RoadVehicle();
rv->subtype = 0;
- previous->SetNext(u);
+ previous->SetNext(rv);
rv->rcache.first_engine = front->engine_type;
rv->rcache.cached_veh_length = 8; // Callback is called when the consist is finished
rv->state = RVSB_IN_DEPOT;