aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;