1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Fix #3609: Crash from invalid peep

This commit is contained in:
zsilencer
2016-05-15 06:21:19 -06:00
parent 8d015f37a9
commit 6db3828f32

View File

@@ -1578,7 +1578,8 @@ void remove_peep_from_queue(rct_peep* peep)
return;
}
for (rct_peep* other_peep = GET_PEEP(ride->last_peep_in_queue[cur_station]);;
for (rct_peep* other_peep = GET_PEEP(ride->last_peep_in_queue[cur_station]);
ride->last_peep_in_queue[cur_station] != 0xFFFF;
other_peep = GET_PEEP(other_peep->next_in_queue)){
if (peep->sprite_index == other_peep->next_in_queue){
other_peep->next_in_queue = peep->next_in_queue;