Fixed a crash

This commit is contained in:
NeeEoo
2023-03-28 18:45:03 +02:00
parent f69c509c65
commit c4c3e44e71
+2 -1
View File
@@ -222,7 +222,8 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver
public override function destroy() {
super.destroy();
call("onDestroy");
stateScript.destroy();
if(stateScript != null)
stateScript.destroy();
}
public override function switchTo(nextState:FlxState) {