diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 29c4278ccc1..0ecddc86aa7 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -1695,6 +1695,9 @@ class ChartingState extends MusicBeatState if (FlxG.keys.justPressed.BACKSPACE) { + // Protect against lost data when quickly leaving the chart editor. + autosaveSong(); + PlayState.chartingMode = false; MusicBeatState.switchState(new editors.MasterEditorMenu()); FlxG.sound.playMusic(Paths.music('freakyMenu'));