diff options
author | Cameron Cawley | 2019-09-22 22:11:53 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-22 23:18:14 +0200 |
commit | 6cf52b515dc950f69c000929bc588d5653169f20 (patch) | |
tree | 332033ecdff65f1a8940afa9bb1eb88e5d2ffeaa /engines | |
parent | de879dd5380c16b03fb2c74d6580bd485f3487f5 (diff) | |
download | scummvm-rg350-6cf52b515dc950f69c000929bc588d5653169f20.tar.gz scummvm-rg350-6cf52b515dc950f69c000929bc588d5653169f20.tar.bz2 scummvm-rg350-6cf52b515dc950f69c000929bc588d5653169f20.zip |
QUEEN: Prevent hang when closing core during dialog
Co-authored-by: jdgleaver <jdgleaver@users.noreply.github.com>
Diffstat (limited to 'engines')
-rw-r--r-- | engines/queen/sound.cpp | 4 |
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 { |