diff options
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/station.cpp b/src/station.cpp index a0b72e7c6..a3df6fe74 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -99,8 +99,12 @@ Station::~Station() /* Clear the persistent storage. */ delete this->airport.psa; - - InvalidateWindowData(WC_STATION_LIST, this->owner, 0); + if (this->owner == OWNER_NONE) { + /* Invalidate all in case of oil rigs. */ + InvalidateWindowClassesData(WC_STATION_LIST, 0); + } else { + InvalidateWindowData(WC_STATION_LIST, this->owner, 0); + } DeleteWindowById(WC_STATION_VIEW, index); |