diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index c3e9b4fa..1a48d065 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -52,7 +52,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 PlayState.instance == null ? null : XMLImportedScriptInfo.prepareInfos(node, PlayState.instance.scripts, (infos) -> xmlImportedScripts.push(infos)); public function new(stage:String, ?state:FlxState, autoLoad:Bool = true) { super();