diff options
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 3 |
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); |