mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-31 18:55:23 +01:00
Fix #6963: Demolishing ride 0 causes freezes
This commit is contained in:
@@ -171,7 +171,8 @@ public:
|
||||
|
||||
for (sint32 i = 0; i < PEEP_MAX_THOUGHTS; i++)
|
||||
{
|
||||
if (peep->thoughts[i].item == _rideIndex)
|
||||
if (peep->thoughts[i].type != PEEP_THOUGHT_TYPE_NONE &&
|
||||
peep->thoughts[i].item == _rideIndex)
|
||||
{
|
||||
// Clear top thought, push others up
|
||||
memmove(&peep->thoughts[i], &peep->thoughts[i + 1], sizeof(rct_peep_thought)*(PEEP_MAX_THOUGHTS - i - 1));
|
||||
|
||||
Reference in New Issue
Block a user