summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormaedhros <maedhros@openttd.org>2007-05-26 17:06:45 +0000
committermaedhros <maedhros@openttd.org>2007-05-26 17:06:45 +0000
commitc7897d4422e35748308a977f966dd7159975945b (patch)
tree8504fcf1ed1adb0358df0d3d113a8d1a2fbedf2f /src
parent3963b48f17daa6c218d350e3136428b2b96c5f01 (diff)
downloadopenttd-c7897d4422e35748308a977f966dd7159975945b.tar.xz
(svn r9939) -Fix (r3139): EngineHasArticPart(v) is only valid for trains.
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 e96145c01..656cde814 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -609,7 +609,7 @@ void DestroyVehicle(Vehicle *v)
/* Now remove any artic part. This will trigger an other
* destroy vehicle, which on his turn can remove any
* other artic parts. */
- if (EngineHasArticPart(v)) DeleteVehicle(v->next);
+ if (v->type == VEH_TRAIN && EngineHasArticPart(v)) DeleteVehicle(v->next);
}
void DeleteVehicleChain(Vehicle *v)