diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sound/music.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 0dfa02c83f..252ea5489c 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -158,8 +158,10 @@ void SciMusic::sendMidiCommandsFromQueue() { } void SciMusic::clearPlayList() { - Common::StackLock lock(_mutex); - + // we must NOT lock our mutex here. Playlist is modified inside soundKill() which will lock the mutex + // during deletion. If we lock it here, a deadlock may occur within soundStop() because that one + // calls the mixer, which will also lock the mixer mutex and if the mixer thread is active during + // that time, we will get a deadlock. while (!_playList.empty()) { soundStop(_playList[0]); soundKill(_playList[0]); |