diff options
author | glx22 <glx22@users.noreply.github.com> | 2019-03-30 22:12:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-30 22:12:25 +0100 |
commit | e93630541de1eb0f4ec9b3474eddf39914ceada2 (patch) | |
tree | e82c62ebeab5439d6b16c5eb4af880ac74e06632 | |
parent | df673e9b2cd1e7eb1a5654f45409ddf18bf4fd87 (diff) | |
download | openttd-e93630541de1eb0f4ec9b3474eddf39914ceada2.tar.xz |
Fix #7433: don't use AirportSpec substitute if it's not set (#7435)
-rw-r--r-- | src/newgrf_airport.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/newgrf_airport.cpp b/src/newgrf_airport.cpp index 14af15a37..46f15b0e1 100644 --- a/src/newgrf_airport.cpp +++ b/src/newgrf_airport.cpp @@ -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]; |