aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2004-09-19 13:54:24 +0000
committerMax Horn2004-09-19 13:54:24 +0000
commit9ec7b57f9bf4ace710bb8136650eef48bc282f61 (patch)
treeced0e47e2513c36e28e745c05075c9cdf6dad082 /sound
parent0ae51c06f0a54108c701240257dd0aceca7aca53 (diff)
downloadscummvm-rg350-9ec7b57f9bf4ace710bb8136650eef48bc282f61.tar.gz
scummvm-rg350-9ec7b57f9bf4ace710bb8136650eef48bc282f61.tar.bz2
scummvm-rg350-9ec7b57f9bf4ace710bb8136650eef48bc282f61.zip
Fix potential race condition
svn-id: r15191
Diffstat (limited to 'sound')
-rw-r--r--sound/mixer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp
index 862967e232..1ddcd86b03 100644
--- a/sound/mixer.cpp
+++ b/sound/mixer.cpp
@@ -464,6 +464,7 @@ void SoundMixer::pauseHandle(PlayingSoundHandle handle, bool paused) {
}
bool SoundMixer::isSoundIDActive(int id) {
+ Common::StackLock lock(_mutex);
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i] && _channels[i]->getId() == id)
return true;