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.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.cpp')
-rw-r--r-- | src/station.cpp | 11 |
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(); } |