summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-10-21 19:16:47 +0000
committerrubidium <rubidium@openttd.org>2014-10-21 19:16:47 +0000
commite811fa1718af11e683b4d2f20e6f62a2cd004821 (patch)
tree3d607f1a810193ef509d90fd01751ddad086072f /src/station.cpp
parent96c321e9588dd0548f01e19e91fbe545e003480e (diff)
downloadopenttd-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.cpp')
-rw-r--r--src/station.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/station.cpp b/src/station.cpp
index c035aafce..e0a48ef22 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -45,13 +45,10 @@ BaseStation::~BaseStation()
if (CleaningPool()) return;
- Owner owner = this->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->index).Pack());
- DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, owner, this->index).Pack());
- DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, owner, this->index).Pack());
- DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, owner, this->index).Pack());
+ DeleteWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->index).Pack());
+ DeleteWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->index).Pack());
+ DeleteWindowById(WC_SHIPS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_SHIP, this->owner, this->index).Pack());
+ DeleteWindowById(WC_AIRCRAFT_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_AIRCRAFT, this->owner, this->index).Pack());
this->sign.MarkDirty();
}