From 1fcb9fcf06be8339c679178585d74b47431757a6 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Fri, 29 Jan 2016 23:10:10 -0500 Subject: [PATCH] - Fixed: Crash when automatically switching sound backends due to failure. --- src/sound/i_sound.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/i_sound.cpp b/src/sound/i_sound.cpp index 78c4526e86..8997c91572 100644 --- a/src/sound/i_sound.cpp +++ b/src/sound/i_sound.cpp @@ -283,6 +283,7 @@ void I_InitSound () if ((!GSnd || !GSnd->IsValid()) && IsOpenALPresent()) { Printf (TEXTCOLOR_RED"FMod Ex Sound init failed. Trying OpenAL.\n"); + I_CloseSound(); GSnd = new OpenALSoundRenderer; snd_backend = "openal"; } @@ -300,6 +301,7 @@ void I_InitSound () if ((!GSnd || !GSnd->IsValid()) && IsFModExPresent()) { Printf (TEXTCOLOR_RED"OpenAL Sound init failed. Trying FMod Ex.\n"); + I_CloseSound(); GSnd = new FMODSoundRenderer; snd_backend = "fmod"; }