summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 0b632029b..f5fa01fe8 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -873,7 +873,7 @@ int32 CmdSellRailWagon(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v = GetVehicle(p1);
- if (v->type == 0 || !CheckOwnership(v->owner))
+ if (v->type != VEH_Train || !CheckOwnership(v->owner))
return CMD_ERROR;
// get first vehicle in chain