diff options
author | rubidium <rubidium@openttd.org> | 2014-10-21 19:16:47 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-10-21 19:16:47 +0000 |
commit | e811fa1718af11e683b4d2f20e6f62a2cd004821 (patch) | |
tree | 3d607f1a810193ef509d90fd01751ddad086072f /src/station_gui.cpp | |
parent | 96c321e9588dd0548f01e19e91fbe545e003480e (diff) | |
download | openttd-e811fa1718af11e683b4d2f20e6f62a2cd004821.tar.xz |
(svn r27030) -Fix: crash when having the vehicle list opened from a buoy or oil rig while the buoy/oil rig gets its final removal (i.e. the sign gets removed)
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r-- | src/station_gui.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 12c22e1af..92b98dd39 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -1303,17 +1303,15 @@ struct StationViewWindow : public Window { this->SelectSortBy(_settings_client.gui.station_gui_sort_by); this->sort_orders[0] = SO_ASCENDING; this->SelectSortOrder((SortOrder)_settings_client.gui.station_gui_sort_order); - Owner owner = Station::Get(window_number)->owner; - if (owner != OWNER_NONE) this->owner = owner; + this->owner = Station::Get(window_number)->owner; } ~StationViewWindow() { - Owner owner = Station::Get(this->window_number)->owner; - 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); - DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, owner, this->window_number).Pack(), false); + DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->window_number).Pack(), false); + DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->window_number).Pack(), false); + DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, this->owner, this->window_number).Pack(), false); + DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, this->owner, this->window_number).Pack(), false); } /** |