twhl-community/halflife-updated

Crash on changelevel during the particles reset

FreeSlave opened this issue · 1 comments

Calling delete particle changes the _particles vector (due to how the CMiniMem::Deallocate is implemented) thus invalidating the loop iterator.

for (auto particle : _particles)
{
particle->Die();
delete particle;
}

To reproduce create some particles and change map while particles still exist.