From 1a935eabd53ed4b1aceb64592cfb24811f4a4ec0 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 18 Sep 2018 12:51:42 -0400 Subject: [PATCH] Mixer I_StopSong: StopFadingSong and var_cleanup call fix --- src/sdl/mixer_sound.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 9b09ffe8..fbd58732 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -1144,6 +1144,8 @@ boolean I_PlaySong(boolean looping) void I_StopSong(void) { + I_StopFadingSong(); + #ifdef HAVE_LIBGME if (gme) { @@ -1153,12 +1155,12 @@ void I_StopSong(void) #endif if (music) { - var_cleanup(); - I_StopFadingSong(); Mix_UnregisterEffect(MIX_CHANNEL_POST, count_music_bytes); Mix_HookMusicFinished(NULL); Mix_HaltMusic(); } + + var_cleanup(); } void I_PauseSong()