diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index f1216902..7c111dbe 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -1541,8 +1541,8 @@ class Charter extends UIState { if (shouldBuild && instance != null) instance.buildChart(); var cur = FlxG.state; while(true) { - if (cur.subState != null) cur = cur.subState; - else return cur.openSubState(new SaveSubstate(Json.stringify(data, replacer, space), options, saveOptions)); + if (instance != null || cur.subState == null) return cur.openSubState(new SaveSubstate(Json.stringify(data, replacer, space), options, saveOptions)); + else cur = cur.subState; } } diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 4d48ae6d..f4e6f04c 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -826,7 +826,7 @@ class PlayState extends MusicBeatState SaveWarning.showWarning = Charter.undos.unsaved; SaveWarning.selectionClass = CharterSelection; SaveWarning.warningFunc = saveWarn; - SaveWarning.saveFunc = () -> Charter.saveEverything(false); + SaveWarning.saveFunc = () -> Charter.saveEverything(false); } }