From 469ff6690f93ebb93fa1c4f11b9eef0520fba62b Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 28 Aug 2024 05:40:50 -0400 Subject: [PATCH] Fix a crash when skipping in the song before it started. --- source/funkin/play/PlayState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 928f392e5..fa059f73a 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1979,7 +1979,7 @@ class PlayState extends MusicBeatSubState if (vocals == null) return; // Skip this if the music is paused (GameOver, Pause menu, start-of-song offset, etc.) - if (!FlxG.sound.music.playing) return; + if (!(FlxG.sound.music?.playing ?? false)) return; var timeToPlayAt:Float = Conductor.instance.songPosition - Conductor.instance.instrumentalOffset; FlxG.sound.music.pause(); vocals.pause();