From 15ede6b76339b13fb1e27d0914660ea4a5b30ee8 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 10 Nov 2009 11:19:07 +0000 Subject: (svn r18035) -Fix (r16909): one could remotely crash (assert) the server on certain commands --- src/station_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 58ffc5ef3..0bb5ff0b9 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -56,6 +56,9 @@ bool IsHangar(TileIndex t) { assert(IsTileType(t, MP_STATION)); + /* If the tile isn't an airport there's no chance it's a hangar. */ + if (!IsAirport(t)) return false; + const Station *st = Station::GetByTile(t); const AirportFTAClass *apc = st->Airport(); -- cgit v1.2.3-70-g09d2