diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index f7bd5cff..b2f7636f 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -115,7 +115,7 @@ class GameOverSubstate extends MusicBeatSubstate PlayState.instance.saveWarn(false); else { PlayState.resetSongInfos(); - Charter.instance.__clearStatics(); + if (Charter.instance != null) Charter.instance.__clearStatics(); if (FlxG.sound.music != null) FlxG.sound.music.stop(); diff --git a/source/funkin/menus/GitarooPause.hx b/source/funkin/menus/GitarooPause.hx index 296f5134..bc782121 100644 --- a/source/funkin/menus/GitarooPause.hx +++ b/source/funkin/menus/GitarooPause.hx @@ -66,7 +66,7 @@ class GitarooPause extends MusicBeatState else { PlayState.resetSongInfos(); - Charter.instance.__clearStatics(); + if (Charter.instance != null) Charter.instance.__clearStatics(); FlxG.switchState(new MainMenuState()); } diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index a7d8f9ee..2fe5e85a 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -163,7 +163,7 @@ class PauseSubState extends MusicBeatSubstate PlayState.instance.saveWarn(false); else { PlayState.resetSongInfos(); - Charter.instance.__clearStatics(); + if (Charter.instance != null) Charter.instance.__clearStatics(); CoolUtil.playMenuSong(); FlxG.switchState(PlayState.isStoryMode ? new StoryMenuState() : new FreeplayState());