mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #8599 from janisozaur/fix-h2h7-r4-diamondheights
Add missing nullptr check in rct_peep::UpdateRideMazePathfinding
This commit is contained in:
commit
5538fe3ac5
|
@ -4722,7 +4722,12 @@ void Guest::UpdateRideMazePathfinding()
|
||||||
|
|
||||||
} while (!(tileElement++)->IsLastForTile());
|
} while (!(tileElement++)->IsLastForTile());
|
||||||
|
|
||||||
uint16_t mazeEntry = tileElement->AsTrack()->GetMazeEntry();
|
auto trackMazeEntry = tileElement->AsTrack();
|
||||||
|
if (trackMazeEntry == nullptr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uint16_t mazeEntry = trackMazeEntry->GetMazeEntry();
|
||||||
uint16_t openHedges = 0;
|
uint16_t openHedges = 0;
|
||||||
// var_37 is 3, 7, 11 or 15
|
// var_37 is 3, 7, 11 or 15
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue