diff options
author | frosch <frosch@openttd.org> | 2010-04-17 14:47:56 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-17 14:47:56 +0000 |
commit | 5ecf2f7f8cb157d959c42b3396398f03d3f3fffb (patch) | |
tree | 28e2ecc16925389891a8adb0a05806f6f56e661c /src/vehicle_cmd.cpp | |
parent | 2a5ddd0daea6e20c2c3de9e46ee0a0fe9973b502 (diff) | |
download | openttd-5ecf2f7f8cb157d959c42b3396398f03d3f3fffb.tar.xz |
(svn r19656) -Codechange/Fix: Report back if invalid vehicle lists are requested.
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r-- | src/vehicle_cmd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 1d3963162..6a72fbbff 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -144,7 +144,7 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 uint32 id = p1; uint16 window_type = p2 & VLW_MASK; - GenerateVehicleSortList(&list, vehicle_type, _current_company, id, window_type); + if (!GenerateVehicleSortList(&list, vehicle_type, _current_company, id, window_type)) return CMD_ERROR; } else { /* Get the list of vehicles in the depot */ BuildDepotVehicleList(vehicle_type, tile, &list, NULL); @@ -596,7 +596,7 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, DoCommandFlag flags, bool s { VehicleList list; - GenerateVehicleSortList(&list, type, owner, id, vlw_flag); + if (!GenerateVehicleSortList(&list, type, owner, id, vlw_flag)) return CMD_ERROR; /* Send all the vehicles to a depot */ bool had_success = false; |