Changeset - r16082:d1d28b86e60e
[Not reviewed]
master
0 1 0
rubidium - 14 years ago 2010-09-11 17:45:03
rubidium@openttd.org
(svn r20785) -Fix: crash when closing the station view of oilrigs (similar to r20774)
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/station_gui.cpp
Show inline comments
 
@@ -905,6 +905,8 @@ struct StationViewWindow : public Window
 
	~StationViewWindow()
 
	{
 
		Owner owner = Station::Get(this->window_number)->owner;
 
		if (!Company::IsValidID(owner)) owner = _local_company;
 
		if (!Company::IsValidID(owner)) return; // Spectators
 
		DeleteWindowById(WC_TRAINS_LIST,   VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN,    owner, this->window_number).Pack(), false);
 
		DeleteWindowById(WC_ROADVEH_LIST,  VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD,     owner, this->window_number).Pack(), false);
 
		DeleteWindowById(WC_SHIPS_LIST,    VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP,     owner, this->window_number).Pack(), false);
0 comments (0 inline, 0 general)