Fix issue causing crash on F5

This commit is contained in:
EliteMasterEric 2023-10-09 15:35:50 -04:00
parent 697be2c88c
commit 5ae2bc814b

View file

@ -649,16 +649,20 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass
} }
boppers = []; boppers = [];
for (sprite in this.group) if (group != null)
{ {
if (sprite != null) for (sprite in this.group)
{ {
sprite.kill(); if (sprite != null)
sprite.destroy(); {
remove(sprite); sprite.kill();
sprite.destroy();
remove(sprite);
}
} }
group.clear();
} }
group.clear();
if (debugIconGroup != null && debugIconGroup.group != null) if (debugIconGroup != null && debugIconGroup.group != null)
{ {
debugIconGroup.kill(); debugIconGroup.kill();