summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle.cpp')
-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);
}