Fixed a crash

This commit is contained in:
NeeEoo
2023-03-27 00:21:41 +02:00
parent 3c7497080e
commit 16ace2d10f
+4 -1
View File
@@ -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;