From 8b05257ec561a0ed27137f7c555ac20700f06d25 Mon Sep 17 00:00:00 2001 From: TheZoroForce240 <86524550+TheZoroForce240@users.noreply.github.com> Date: Fri, 4 Jul 2025 18:35:54 +0100 Subject: [PATCH] fix loading stages with imported scripts outside of playstate (#678) --- source/funkin/game/Stage.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index 9b3782ca..d2a52880 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -32,7 +32,7 @@ class Stage extends FlxBasic implements IBeatReceiver { for (k=>e in stageSprites) script.set(k, e); public function prepareInfos(node:Access) - return XMLImportedScriptInfo.prepareInfos(node, PlayState.instance.scripts, (infos) -> xmlImportedScripts.push(infos)); + return XMLImportedScriptInfo.prepareInfos(node, PlayState.instance != null ? PlayState.instance.scripts : null, (infos) -> xmlImportedScripts.push(infos)); public function new(stage:String, ?state:FlxState) { super();