mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-12 00:15:10 +00:00
Merge pull request #363 from FunkinCrew/bugfix/chart-editor-vocal-crash
Fix a bug where Chart Editor Playtest destroys the vocals and crashes
This commit is contained in:
commit
95138d0386
|
@ -2791,14 +2791,19 @@ class PlayState extends MusicBeatSubState
|
|||
// TODO: Uncache the song.
|
||||
}
|
||||
|
||||
if (!overrideMusic)
|
||||
if (overrideMusic)
|
||||
{
|
||||
// Stop the music.
|
||||
// Stop the music. Do NOT destroy it, something still references it!
|
||||
FlxG.sound.music.pause();
|
||||
if (vocals != null) vocals.stop();
|
||||
if (vocals != null)
|
||||
{
|
||||
vocals.pause();
|
||||
remove(vocals);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Stop and destroy the music.
|
||||
FlxG.sound.music.pause();
|
||||
if (vocals != null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue