ok should be fixed now

This commit is contained in:
lunarcleint
2023-07-18 18:04:23 -07:00
parent 6f3ab6f876
commit 9ffff13ce8
+7 -4
View File
@@ -149,11 +149,14 @@ class MusicBeatSubstate extends FlxSubState implements IBeatReceiver
}
override function close() {
var event = scripts.event("onClose", new CancellableEvent());
if (!event.cancelled) {
if (scripts != null) {
var event = scripts.event("onClose", new CancellableEvent());
if (!event.cancelled) {
super.close();
scripts.call("onClosePost");
}
} else
super.close();
scripts.call("onClosePost");
}
}
override function create()