fix loading stages with imported scripts outside of playstate (#678)

This commit is contained in:
TheZoroForce240
2025-07-04 19:35:54 +02:00
committed by GitHub
parent e4baf51e06
commit 8b05257ec5
+1 -1
View File
@@ -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();