mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-12-03 12:56:59 -05:00
Fix an audio crash when exiting a cutscene
This commit is contained in:
parent
0409c0ba6a
commit
07ad250060
1 changed files with 8 additions and 2 deletions
|
@ -2941,7 +2941,10 @@ 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!
|
||||||
|
if (FlxG.sound.music != null)
|
||||||
|
{
|
||||||
FlxG.sound.music.pause();
|
FlxG.sound.music.pause();
|
||||||
|
}
|
||||||
if (vocals != null)
|
if (vocals != null)
|
||||||
{
|
{
|
||||||
vocals.pause();
|
vocals.pause();
|
||||||
|
@ -2951,7 +2954,10 @@ class PlayState extends MusicBeatSubState
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Stop and destroy the music.
|
// Stop and destroy the music.
|
||||||
|
if (FlxG.sound.music != null)
|
||||||
|
{
|
||||||
FlxG.sound.music.pause();
|
FlxG.sound.music.pause();
|
||||||
|
}
|
||||||
if (vocals != null)
|
if (vocals != null)
|
||||||
{
|
{
|
||||||
vocals.destroy();
|
vocals.destroy();
|
||||||
|
|
Loading…
Reference in a new issue