aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2008-02-27 18:17:50 +0000
committerFilippos Karapetis2008-02-27 18:17:50 +0000
commit99a5d115449123358342062e60c84f55f9448104 (patch)
treeb98a9d100787783bec739ae43f60ca77df79b98b /engines/saga
parent113ce2b900f164b636ec633354497568461dab06 (diff)
downloadscummvm-rg350-99a5d115449123358342062e60c84f55f9448104.tar.gz
scummvm-rg350-99a5d115449123358342062e60c84f55f9448104.tar.bz2
scummvm-rg350-99a5d115449123358342062e60c84f55f9448104.zip
Don't change the voice bank when no voice files are present. This will stop SAGA games from crashing when no voice files are present in talkie versions of ITE and IHNM (regression from commit #30648)
svn-id: r30989
Diffstat (limited to 'engines/saga')
-rw-r--r--engines/saga/sndres.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index d6114b3fc4..18f410bd90 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -101,7 +101,12 @@ SndRes::~SndRes() {
}
void SndRes::setVoiceBank(int serial) {
- if (_voiceSerial == serial) return;
+ if (_voiceSerial == serial)
+ return;
+
+ // If there are no voice files present, don't set the voice bank
+ if (!_vm->_voiceFilesExist)
+ return;
// Close previous voice bank file
if (_voiceSerial >= 0 && _voiceContext->file->isOpen())