aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2004-06-20 13:19:22 +0000
committerPaweł Kołodziejski2004-06-20 13:19:22 +0000
commitb6ce351f6d65309175f53182be4c3d97f3ce3e62 (patch)
tree71502c74425ae51f455019365c580a7a62dd4e2b
parent8f1191b3792ed777e7d6ea7c137b65987a556b2e (diff)
downloadscummvm-rg350-b6ce351f6d65309175f53182be4c3d97f3ce3e62.tar.gz
scummvm-rg350-b6ce351f6d65309175f53182be4c3d97f3ce3e62.tar.bz2
scummvm-rg350-b6ce351f6d65309175f53182be4c3d97f3ce3e62.zip
fix for not finding sample
svn-id: r13970
-rw-r--r--scumm/imuse_digi/dimuse_sndmgr.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/scumm/imuse_digi/dimuse_sndmgr.cpp b/scumm/imuse_digi/dimuse_sndmgr.cpp
index 505eff5434..7e5a6b2513 100644
--- a/scumm/imuse_digi/dimuse_sndmgr.cpp
+++ b/scumm/imuse_digi/dimuse_sndmgr.cpp
@@ -325,7 +325,10 @@ ImuseDigiSndMgr::soundStruct *ImuseDigiSndMgr::openSound(int32 soundId, const ch
closeSound(sound);
return NULL;
}
- sound->bundle->decompressSampleByIndex(soundId, 0, 0x2000, &ptr, 0, header_outside);
+ if (sound->bundle->decompressSampleByIndex(soundId, 0, 0x2000, &ptr, 0, header_outside) == 0) {
+ closeSound(sound);
+ return NULL;
+ }
sound->soundId = soundId;
sound->type = soundType;
sound->volGroupId = volGroupId;
@@ -345,7 +348,10 @@ ImuseDigiSndMgr::soundStruct *ImuseDigiSndMgr::openSound(int32 soundId, const ch
closeSound(sound);
return NULL;
}
- sound->bundle->decompressSampleByName(soundName, 0, 0x2000, &ptr, header_outside);
+ if (sound->bundle->decompressSampleByName(soundName, 0, 0x2000, &ptr, header_outside) == 0) {
+ closeSound(sound);
+ return NULL;
+ }
strcpy(sound->name, soundName);
sound->soundId = soundId;
sound->type = soundType;