mirror of https://github.com/OpenTTD/OpenTTD
Fix 5575379: Crash with default airports. (#14120)
parent
f62f728187
commit
d85f6dccc5
|
@ -323,9 +323,11 @@ bool TriggerAirportAnimation(Station *st, AirportAnimationTrigger trigger, Cargo
|
||||||
for (TileIndex tile : st->airport) {
|
for (TileIndex tile : st->airport) {
|
||||||
if (!st->TileBelongsToAirport(tile)) continue;
|
if (!st->TileBelongsToAirport(tile)) continue;
|
||||||
|
|
||||||
|
const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile);
|
||||||
|
if (ats->grf_prop.grffile == nullptr) continue;
|
||||||
|
|
||||||
uint8_t var18_extra = 0;
|
uint8_t var18_extra = 0;
|
||||||
if (IsValidCargoType(cargo_type)) {
|
if (IsValidCargoType(cargo_type)) {
|
||||||
const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile);
|
|
||||||
var18_extra |= ats->grf_prop.grffile->cargo_map[cargo_type] << 8;
|
var18_extra |= ats->grf_prop.grffile->cargo_map[cargo_type] << 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue