diff options
author | Max Horn | 2004-09-19 13:54:24 +0000 |
---|---|---|
committer | Max Horn | 2004-09-19 13:54:24 +0000 |
commit | 9ec7b57f9bf4ace710bb8136650eef48bc282f61 (patch) | |
tree | ced0e47e2513c36e28e745c05075c9cdf6dad082 /sound | |
parent | 0ae51c06f0a54108c701240257dd0aceca7aca53 (diff) | |
download | scummvm-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.cpp | 1 |
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; |