Skip to content

Commit

Permalink
Fix OpenRCT2#8224: invalid access in peep_find_ride_to_look_at (OpenR…
Browse files Browse the repository at this point in the history
…CT2#8225)

* Fix OpenRCT2#8224: invalid access in peep_find_ride_to_look_at

* Update Guest.cpp
  • Loading branch information
janisozaur authored Nov 5, 2018
1 parent 3aeb87b commit da965cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/openrct2/peep/Guest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6434,6 +6434,12 @@ static bool peep_find_ride_to_look_at(rct_peep* peep, uint8_t edge, uint8_t* rid

// TODO: extract loop A
tileElement = surfaceElement;

if (tileElement == nullptr)
{
return false;
}

do
{
// Ghosts are purely this-client-side and should not cause any interaction,
Expand Down

0 comments on commit da965cb

Please sign in to comment.