diff --git a/source/funkin/play/stage/Stage.hx b/source/funkin/play/stage/Stage.hx index 1ac9b0b67..d9875e456 100644 --- a/source/funkin/play/stage/Stage.hx +++ b/source/funkin/play/stage/Stage.hx @@ -649,16 +649,20 @@ class Stage extends FlxSpriteGroup implements IPlayStateScriptedClass } boppers = []; - for (sprite in this.group) + if (group != null) { - if (sprite != null) + for (sprite in this.group) { - sprite.kill(); - sprite.destroy(); - remove(sprite); + if (sprite != null) + { + sprite.kill(); + sprite.destroy(); + remove(sprite); + } } + group.clear(); } - group.clear(); + if (debugIconGroup != null && debugIconGroup.group != null) { debugIconGroup.kill();