From d1ef13fc04d378a805711dd256ff696301da1e34 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Fri, 26 Apr 2019 21:34:55 +0200 Subject: Fix #7481: Just remove oil rig stations right away, don't clean them first --- src/station_cmd.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'src/station_cmd.cpp') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0ba824c0d..1a483d29d 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4029,16 +4029,9 @@ void DeleteOilRig(TileIndex tile) MakeWaterKeepingClass(tile, OWNER_NONE); - st->dock_tile = INVALID_TILE; - st->airport.Clear(); - st->facilities &= ~(FACIL_AIRPORT | FACIL_DOCK); - st->airport.flags = 0; - - st->rect.AfterRemoveTile(st, tile); - - st->UpdateVirtCoord(); - st->RecomputeCatchment(); - if (!st->IsInUse()) delete st; + /* The oil rig station is not supposed to be shared with anything else */ + assert(st->facilities == (FACIL_AIRPORT | FACIL_DOCK) && st->airport.type == AT_OILRIG); + delete st; } static void ChangeTileOwner_Station(TileIndex tile, Owner old_owner, Owner new_owner) -- cgit v1.2.3-70-g09d2