aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/queen/sound.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index d715d3737e..85c1f82bf0 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -289,7 +289,9 @@ void PCSound::playSound(const char *base, bool isSpeech) {
}
strcat(name, ".SB");
if (isSpeech) {
- while (_mixer->isSoundHandleActive(_speechHandle)) {
+ // Add _vm->shouldQuit() check here, otherwise game gets stuck
+ // in an infinite loop if we try to quit while a sound is playing...
+ while (_mixer->isSoundHandleActive(_speechHandle) && !_vm->shouldQuit()) {
_vm->input()->delay(10);
}
} else {