1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Merge pull request #3159 from janisozaur/develop

Don't crash when fixing a hacked ride
This commit is contained in:
Duncan
2016-03-23 18:26:16 +00:00

View File

@@ -3757,6 +3757,9 @@ static bool peep_update_fixing_sub_state_9(bool firstRun, rct_peep *peep, rct_ri
input.x = (stationPosition & 0xFF) * 32;
input.y = (stationPosition >> 8) * 32;
input.element = map_get_track_element_at_from_ride(input.x, input.y, stationZ, peep->current_ride);
if (input.element == NULL) {
return true;
}
track_begin_end trackBeginEnd;
while (track_block_get_previous(input.x, input.y, input.element, &trackBeginEnd)) {