Fix Charting Game Over Crash

Pressing Escape in gameover screen while charting crashed because its closes PlayState but it tries to access it's instance after.
This commit is contained in:
gamerbross 2024-05-11 18:02:23 +02:00 committed by GitHub
parent 34a6e16385
commit f496efbd9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -252,6 +252,7 @@ class GameOverSubState extends MusicBeatSubState
this.close();
if (FlxG.sound.music != null) FlxG.sound.music.pause(); // Don't reset song position!
PlayState.instance.close(); // This only works because PlayState is a substate!
return;
}
else if (PlayStatePlaylist.isStoryMode)
{