forked from Mirrors/openclonk
fix possible crash on cleaning up particles
It could happen that the objects were cleared (after evaluation screen / on section change) but a particle list would remain that would still point to an object (and would then access it). I am not exactly sure how that could happen, because objects should clear their particle lists on removal (and thus shouldn't really need a ClearPointers). There is a tiny chance that this points to another bug somewhere in the object removal - that's just a random guess though. Anyway, this should fix the infamous Knüppeln crash.qteditor
parent
2df2946016
commit
acde7c923a
|
@ -575,12 +575,13 @@ void C4Game::Clear()
|
|||
StartupScenarioParameters.Clear();
|
||||
Weather.Clear();
|
||||
GraphicsSystem.Clear();
|
||||
// Clear the particles before cleaning up the objects.
|
||||
Particles.Clear();
|
||||
DeleteObjects(true);
|
||||
::Definitions.Clear();
|
||||
Landscape.Clear();
|
||||
PXS.Clear();
|
||||
ScriptGuiRoot.reset();
|
||||
Particles.Clear();
|
||||
::MaterialMap.Clear();
|
||||
TextureMap.Clear(); // texture map *MUST* be cleared after the materials, because of the patterns!
|
||||
::Messages.Clear();
|
||||
|
|
Loading…
Reference in New Issue