summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-08-26 16:39:02 +0000
committerrubidium <rubidium@openttd.org>2011-08-26 16:39:02 +0000
commit4836a6e50e94978e2f363d586838cea2bdb9c26e (patch)
tree14c32b2f0aa2dde2384308d54a3c0c65a4c2735f /src/vehicle_cmd.cpp
parent9975f30eb76025ba911323f75e06b5f7d6e2e4a5 (diff)
downloadopenttd-4836a6e50e94978e2f363d586838cea2bdb9c26e.tar.xz
(svn r22845) -Fix [FS#4745]: perform stricter checks on some commands (monoid)
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index fdb9fd66c..46d8ba8e0 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -524,10 +524,11 @@ CommandCost CmdDepotSellAllVehicles(TileIndex tile, DoCommandFlag flags, uint32
CommandCost cost(EXPENSES_NEW_VEHICLES);
VehicleType vehicle_type = Extract<VehicleType, 0, 3>(p1);
- uint sell_command = GetCmdSellVeh(vehicle_type);
if (!IsCompanyBuildableVehicleType(vehicle_type)) return CMD_ERROR;
+ uint sell_command = GetCmdSellVeh(vehicle_type);
+
/* Get the list of vehicles in the depot */
BuildDepotVehicleList(vehicle_type, tile, &list, &list);