summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-04-20 17:52:28 +0000
committerrubidium <rubidium@openttd.org>2007-04-20 17:52:28 +0000
commit17dc1c6336eae5ca31b8cee7047bbe49876e061e (patch)
tree2788973967a66610b98655ffddf40ff700a9677c /src
parent98fe82da662c012d3fda3418fac9cbeb27162ba6 (diff)
downloadopenttd-17dc1c6336eae5ca31b8cee7047bbe49876e061e.tar.xz
(svn r9692) -Fix (r9683): don't try to remove vehicles from the queue of a non-existing station.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}