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
commit3914f3c85c76d5a770af43cf9c62eb045251604e (patch)
tree8504fcf1ed1adb0358df0d3d113a8d1a2fbedf2f /src
parentfd2d6329f3be06525bc1ea5681c9b563cf202502 (diff)
downloadopenttd-3914f3c85c76d5a770af43cf9c62eb045251604e.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)