From 17dc1c6336eae5ca31b8cee7047bbe49876e061e Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 20 Apr 2007 17:52:28 +0000 Subject: (svn r9692) -Fix (r9683): don't try to remove vehicles from the queue of a non-existing station. --- src/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f085e7887..d4cdcd083 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -570,7 +570,7 @@ bool IsEngineCountable(const Vehicle *v) void DestroyVehicle(Vehicle *v) { - if (v->last_station_visited != INVALID_STATION) { + if (IsValidStationID(v->last_station_visited)) { GetStation(v->last_station_visited)->loading_vehicles.remove(v); } -- cgit v1.2.3-54-g00ecf