summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-06 23:54:54 +0000
committeryexo <yexo@openttd.org>2010-03-06 23:54:54 +0000
commit8d033e964ef50dab43dd1eac309ffc3c13ac5796 (patch)
treec55a45c4cb5a079e0aaa1408817a87b8987d023c
parentd7f7c8949f555fb9f11e7fb4fffbbcf12426b27e (diff)
downloadopenttd-8d033e964ef50dab43dd1eac309ffc3c13ac5796.tar.xz
(svn r19361) -Fix [FS#3664](r19353): crash when an airport was deleted
-rw-r--r--src/airport.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/airport.cpp b/src/airport.cpp
index 00ef18137..2db4b8af0 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -378,5 +378,6 @@ static void AirportPrintOut(uint nofelements, const AirportFTA *layout, bool ful
const AirportFTAClass *GetAirport(const byte airport_type)
{
+ if (airport_type == AT_DUMMY) return &_airportfta_dummy;
return AirportSpec::Get(airport_type)->fsm;
}