summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index 82a2bf719..c0649f069 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -1654,7 +1654,7 @@ int32 CmdNameVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
Vehicle *v;
StringID str;
- if (!IsVehicleIndex(p1)) return CMD_ERROR;
+ if (!IsVehicleIndex(p1) || _cmd_text[0] == '\0') return CMD_ERROR;
v = GetVehicle(p1);