summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/depot_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index dc90e50de..ec21d4069 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -143,7 +143,7 @@ void CcCloneVehicle(bool success, TileIndex tile, uint32 p1, uint32 p2)
Vehicle *v = GetVehicle(_new_vehicle_id);
- switch(GetVehicle(p1)->type) {
+ switch (v->type) {
case VEH_TRAIN: ShowTrainViewWindow(v); break;
case VEH_ROAD: ShowRoadVehViewWindow(v); break;
case VEH_SHIP: ShowShipViewWindow(v); break;