Fix 8d62a8f0: Road stop variable 6B crashing for road stop preview in GUI

This commit is contained in:
Jonathan G Rennison 2024-09-06 01:15:25 +01:00
parent 2c5502dc2d
commit 474d90ec40

View File

@ -223,6 +223,7 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete
/* 16 bit road stop ID of nearby tiles */
case 0x6B: {
if (this->tile == INVALID_TILE) return 0xFFFFFFFF;
TileIndex nearby_tile = GetNearbyTile(parameter, this->tile);
if (!IsAnyRoadStopTile(nearby_tile)) return 0xFFFFFFFF;