station_cmd.c
changeset 700 c973846fe239
parent 679 e959706a3e4d
child 701 3a1b4771be58
--- 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;