From 16ace2d10fc9237860c555cf5094096aeec6013d Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Mon, 27 Mar 2023 00:21:41 +0200 Subject: [PATCH] Fixed a crash --- source/funkin/game/GameOverSubstate.hx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index 7abb8d9d..30921825 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -100,7 +100,10 @@ class GameOverSubstate extends MusicBeatSubstate { isEnding = true; character.playAnim('deathConfirm', true); - FlxG.sound.music.stop(); + if (FlxG.sound.music != null) + FlxG.sound.music.stop(); + FlxG.sound.music = null; + var sound = FlxG.sound.play(Paths.sound(retrySFX)); var secsLength:Float = sound.length / 1000;