(svn r11027) -Fix: do not unconditionally assume that a tile has a depot.

This commit is contained in:
rubidium
2007-08-31 20:52:38 +00:00
parent a06b8a510b
commit 2cd15f732c
2 changed files with 18 additions and 2 deletions

View File

@@ -1634,7 +1634,7 @@ CommandCost CmdDepotMassAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uin
CommandCost cost;
VehicleType vehicle_type = (VehicleType)GB(p1, 0, 8);
if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
if (!IsDepotTile(tile) || !IsTileOwner(tile, _current_player)) return CMD_ERROR;
/* Get the list of vehicles in the depot */
BuildDepotVehicleList(vehicle_type, tile, &vl, &engine_list_length, &engine_count, NULL, NULL, NULL);