1
0
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:
Michael Steenbeek
2018-01-06 14:42:46 +01:00
parent b7b4e3aeba
commit 0430cfb6db

View File

@@ -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));