From 079b1f327a0251b6c60479fecb945a9dbc2a354d Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Tue, 30 Apr 2024 23:24:43 -0400 Subject: [PATCH] Fix two crashes thanks to a crash report --- source/funkin/play/PlayState.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 978bacab8..9b205c432 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1010,7 +1010,8 @@ class PlayState extends MusicBeatSubState if (health <= Constants.HEALTH_MIN && !isPracticeMode && !isPlayerDying) { vocals.pause(); - FlxG.sound.music.pause(); + + if (FlxG.sound.music != null) FlxG.sound.music.pause(); deathCounter += 1; @@ -3115,8 +3116,8 @@ class PlayState extends MusicBeatSubState */ public function pauseMusic():Void { - FlxG.sound.music.pause(); - vocals.pause(); + if (FlxG.sound.music != null) FlxG.sound.music.pause(); + if (vocals != null) vocals.pause(); } /**