diff options
author | Paweł Kołodziejski | 2004-06-20 13:19:22 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2004-06-20 13:19:22 +0000 |
commit | b6ce351f6d65309175f53182be4c3d97f3ce3e62 (patch) | |
tree | 71502c74425ae51f455019365c580a7a62dd4e2b | |
parent | 8f1191b3792ed777e7d6ea7c137b65987a556b2e (diff) | |
download | scummvm-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.cpp | 10 |
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; |