1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-04-21 04:44:31 +00:00

Resolve FlxG.sound.music crash

This commit is contained in:
EliteMasterEric 2024-03-26 19:38:42 -04:00
parent 0409c0ba6a
commit e84fdf9fac

View file

@ -2941,7 +2941,7 @@ class PlayState extends MusicBeatSubState
if (overrideMusic) if (overrideMusic)
{ {
// Stop the music. Do NOT destroy it, something still references it! // Stop the music. Do NOT destroy it, something still references it!
FlxG.sound.music.pause(); if (FlxG.sound.music != null) FlxG.sound.music.pause();
if (vocals != null) if (vocals != null)
{ {
vocals.pause(); vocals.pause();
@ -2951,7 +2951,7 @@ class PlayState extends MusicBeatSubState
else else
{ {
// Stop and destroy the music. // Stop and destroy the music.
FlxG.sound.music.pause(); if (FlxG.sound.music != null) FlxG.sound.music.pause();
if (vocals != null) if (vocals != null)
{ {
vocals.destroy(); vocals.destroy();