aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorWalter van Niftrik2009-06-06 12:30:13 +0000
committerWalter van Niftrik2009-06-06 12:30:13 +0000
commitbc6d19aa1a7fea4f1cef3f0bbeb5d42739fafa80 (patch)
treec10fd56b00497b422e5d13c406f3963673b5e7de /engines
parent94e976287081969c3c52e0e97bd400da09970f44 (diff)
downloadscummvm-rg350-bc6d19aa1a7fea4f1cef3f0bbeb5d42739fafa80.tar.gz
scummvm-rg350-bc6d19aa1a7fea4f1cef3f0bbeb5d42739fafa80.tar.bz2
scummvm-rg350-bc6d19aa1a7fea4f1cef3f0bbeb5d42739fafa80.zip
SCI: Fix audio regression in KQ5CD, introduced in r41205.
svn-id: r41222
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/resource.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index 01be4c5ba6..13eedcc7ae 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -1650,11 +1650,13 @@ Audio::AudioStream* AudioResource::getAudioStream(uint32 audioNumber, uint32 vol
byte *data = 0;
char filename[40];
byte flags = 0;
+ Sci::Resource* audioRes = NULL;
// Try to load from resource manager
- if (volume == 65535) {
- Sci::Resource* audioRes = _resMgr->findResource(kResourceTypeAudio, audioNumber, false);
+ if (volume == 65535)
+ audioRes = _resMgr->findResource(kResourceTypeAudio, audioNumber, false);
+ if (audioRes) {
if (_sciVersion < SCI_VERSION_1_1) {
size = audioRes->size;
data = audioRes->data;