(svn r9692) -Fix (r9683): don't try to remove vehicles from the queue of a non-existing station.
authorrubidium
Fri, 20 Apr 2007 17:52:28 +0000
changeset 7005 09d7f6a8f398
parent 7004 a841bf508c46
child 7006 e1ff46bee5b4
(svn r9692) -Fix (r9683): don't try to remove vehicles from the queue of a non-existing station.
src/vehicle.cpp
--- a/src/vehicle.cpp	Fri Apr 20 17:26:10 2007 +0000
+++ b/src/vehicle.cpp	Fri Apr 20 17:52:28 2007 +0000
@@ -570,7 +570,7 @@
 
 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);
 	}