# HG changeset patch # User tron # Date 1103373634 0 # Node ID c973846fe239201b85139f76a81549b8ccf4dce5 # Parent 02b8b9c9194fba31e8e247dc5ae6fedeb975e357 (svn r1150) Fixes: - Don't crash when building or destroying airport without depots (bugs were latent before r1149) - Delete all hangar windows when destroying an airport, not just the first one (before r1149 none where deleted) diff -r 02b8b9c9194f -r c973846fe239 station_cmd.c --- a/station_cmd.c Sat Dec 18 12:19:04 2004 +0000 +++ b/station_cmd.c Sat Dec 18 12:40:34 2004 +0000 @@ -1651,8 +1651,12 @@ } if (flags & DC_EXEC) { - if (st->airport_type <= AT_INTERNATIONAL) - DeleteWindowById(WC_VEHICLE_DEPOT, tile + GetAirport(st->airport_type)->airport_depots[0]); + const AirportFTAClass *afc = GetAirport(st->airport_type); + uint i; + + for (i = 0; i < afc->nof_depots; ++i) + DeleteWindowById(WC_VEHICLE_DEPOT, + tile + GetAirport(st->airport_type)->airport_depots[i]); st->airport_tile = 0; st->facilities &= ~FACIL_AIRPORT;