From c8c06ceee988318b7a505c44c6d2eb2d09d46d39 Mon Sep 17 00:00:00 2001 From: jeremy Date: Thu, 4 Jul 2019 22:48:33 +0200 Subject: [PATCH] Fixed SoundManager::stopSound when output is not initialized (bug #4600 probably) --- apps/openmw/mwsound/soundmanagerimp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/openmw/mwsound/soundmanagerimp.cpp b/apps/openmw/mwsound/soundmanagerimp.cpp index 77f25f3260..aa1686f7c8 100644 --- a/apps/openmw/mwsound/soundmanagerimp.cpp +++ b/apps/openmw/mwsound/soundmanagerimp.cpp @@ -747,6 +747,9 @@ namespace MWSound void SoundManager::stopSound(const std::string& soundId) { + if(!mOutput->isInitialized()) + return; + Sound_Buffer *sfx = loadSound(Misc::StringUtils::lowerCase(soundId)); if (!sfx) return; @@ -755,6 +758,9 @@ namespace MWSound void SoundManager::stopSound3D(const MWWorld::ConstPtr &ptr, const std::string& soundId) { + if(!mOutput->isInitialized()) + return; + Sound_Buffer *sfx = loadSound(Misc::StringUtils::lowerCase(soundId)); if (!sfx) return;