From bc6d19aa1a7fea4f1cef3f0bbeb5d42739fafa80 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sat, 6 Jun 2009 12:30:13 +0000 Subject: SCI: Fix audio regression in KQ5CD, introduced in r41205. svn-id: r41222 --- engines/sci/resource.cpp | 6 ++++-- 1 file 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; -- cgit v1.2.3