From 871b37906b28d0b9249de3e8bee9ff9241518ab2 Mon Sep 17 00:00:00 2001 From: Louis M Date: Wed, 28 Feb 2024 13:53:39 -0500 Subject: [PATCH] Modification in concordance with commit 91bd6ae --- BBGE/SoundManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BBGE/SoundManager.cpp b/BBGE/SoundManager.cpp index 0811c8f..ed24df7 100644 --- a/BBGE/SoundManager.cpp +++ b/BBGE/SoundManager.cpp @@ -1572,7 +1572,10 @@ void SoundManager::clearLocalSounds() std::string snd = (*i); debugLog("unloading sound [" + snd + "]"); FMOD::Sound *samp = (FMOD::Sound*)soundMap[snd]; - samp->release(); + if (samp) + { + samp->release(); + } soundMap[snd] = 0; } localSounds.clear();