1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 00:49:11 +00:00

Fix #7433: don't use AirportSpec substitute if it's not set (#7435)

This commit is contained in:
glx22
2019-03-30 22:12:25 +01:00
committed by PeterN
parent 0b340fd376
commit d3e9e8c2ce

View File

@@ -100,6 +100,7 @@ AirportSpec AirportSpec::specs[NUM_AIRPORTS]; ///< Airport specifications.
assert(type < lengthof(AirportSpec::specs));
const AirportSpec *as = &AirportSpec::specs[type];
if (type >= NEW_AIRPORT_OFFSET && !as->enabled) {
if (_airport_mngr.GetGRFID(type) == 0) return as;
byte subst_id = _airport_mngr.GetSubstituteID(type);
if (subst_id == AT_INVALID) return as;
as = &AirportSpec::specs[subst_id];