summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-18 18:52:16 +0000
committerrubidium <rubidium@openttd.org>2010-08-18 18:52:16 +0000
commit019878118d11a6596eeab608c361dfea06c3f1ff (patch)
tree4675f56eaa3968827b3a98a1dd924f1de7c4bd13 /src/vehicle_gui.cpp
parente2422945301452421ede848aa67a2ff47ed03d13 (diff)
downloadopenttd-019878118d11a6596eeab608c361dfea06c3f1ff.tar.xz
(svn r20545) -Codechange: make sure an OrderBackup gets cleared when the depot it belongs to gets removed, the depot window gets closed or when another vehicle gets sold in a depot
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 7d62184aa..a38a91492 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -2373,7 +2373,6 @@ void CcBuildPrimaryVehicle(const CommandCost &result, TileIndex tile, uint32 p1,
if (result.Failed()) return;
const Vehicle *v = Vehicle::Get(_new_vehicle_id);
- OrderBackup *ob = OrderBackup::GetByTile(v->tile);
- if (ob != NULL) ob->RestoreTo(v);
+ OrderBackup::Restore(v);
ShowVehicleViewWindow(v);
}