mirror of https://github.com/OpenTTD/OpenTTD
(svn r18035) -Fix (r16909): one could remotely crash (assert) the server on certain commands
parent
7247011636
commit
15ede6b763
|
@ -56,6 +56,9 @@ bool IsHangar(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_STATION));
|
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 Station *st = Station::GetByTile(t);
|
||||||
const AirportFTAClass *apc = st->Airport();
|
const AirportFTAClass *apc = st->Airport();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue