fix crash loading stages

This commit is contained in:
lunarcleint
2025-02-24 16:08:35 -07:00
parent c2720890c2
commit be9d5650d1
+1 -1
View File
@@ -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();