1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Fix #13641: Game crashes after a while (#13642)

This commit is contained in:
Michael Steenbeek
2020-12-23 22:37:43 +01:00
committed by GitHub
parent eeacb85310
commit f9e90ed84c

View File

@@ -6208,7 +6208,8 @@ static bool peep_find_ride_to_look_at(Peep* peep, uint8_t edge, uint8_t* rideToV
if (tileElement->GetType() == TILE_ELEMENT_TYPE_LARGE_SCENERY)
{
if (!(tileElement->AsLargeScenery()->GetEntry()->large_scenery.flags & LARGE_SCENERY_FLAG_PHOTOGENIC))
const auto* sceneryEntry = tileElement->AsLargeScenery()->GetEntry();
if (sceneryEntry == nullptr || !(sceneryEntry->large_scenery.flags & LARGE_SCENERY_FLAG_PHOTOGENIC))
{
continue;
}