From 99a5d115449123358342062e60c84f55f9448104 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 27 Feb 2008 18:17:50 +0000 Subject: 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 --- engines/saga/sndres.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines/saga/sndres.cpp') 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()) -- cgit v1.2.3