summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-10 14:37:55 +0000
committerrubidium <rubidium@openttd.org>2009-09-10 14:37:55 +0000
commit860a538adc56a678f640f606692ea7ca00c8d424 (patch)
tree70ac11ef8b475179092b2a435fa768d761bcc3b5 /src/vehicle_gui.cpp
parent751ea62f442f0a8b1623e3df0c0ac5971f776d40 (diff)
downloadopenttd-860a538adc56a678f640f606692ea7ca00c8d424.tar.xz
(svn r17495) -Codechange: replace 'Depot::Get(GetDepotIndex(tile))->index' with GetDepotIndex(tile)
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 0719bbfe2..efb13681d 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1177,9 +1177,7 @@ void ShowVehicleListWindow(CompanyID company, VehicleType vehicle_type, TileInde
if (vehicle_type == VEH_AIRCRAFT) {
depot_airport_index = GetStationIndex(depot_tile);
} else {
- Depot *depot = Depot::GetByTile(depot_tile);
- if (depot == NULL) return; // no depot to show
- depot_airport_index = depot->index;
+ depot_airport_index = GetDepotIndex(depot_tile);
}
ShowVehicleListWindowLocal(company, VLW_DEPOT_LIST, vehicle_type, depot_airport_index);
}