summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-10-31 12:59:47 +0000
committerbjarni <bjarni@openttd.org>2005-10-31 12:59:47 +0000
commitfa5ca040e9482e4d07677b371d2f8fe0cf24fc7e (patch)
tree27e67e4ab96bd9ad2c2eea8092cd15b2d09de93c /roadveh_cmd.c
parent229535750bdea13304a7e3c280185e71b3e34fe1 (diff)
downloadopenttd-fa5ca040e9482e4d07677b371d2f8fe0cf24fc7e.tar.xz
(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks() This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 149fe3fd1..32a2fd25d 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1522,8 +1522,6 @@ void RoadVehEnterDepot(Vehicle *v)
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- v = MaybeReplaceVehicle(v);
-
VehicleServiceInDepot(v);
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);