diff options
author | James Brown | 2002-10-10 15:49:33 +0000 |
---|---|---|
committer | James Brown | 2002-10-10 15:49:33 +0000 |
commit | d44725a3dc975468dca0f96341793455d2fd8674 (patch) | |
tree | 52a58c75ed731df72c977c0b324609e751cd1aa6 /scumm | |
parent | 443e88d2a45c292fc81eda2ef23c0c3ae1d2192f (diff) | |
download | scummvm-rg350-d44725a3dc975468dca0f96341793455d2fd8674.tar.gz scummvm-rg350-d44725a3dc975468dca0f96341793455d2fd8674.tar.bz2 scummvm-rg350-d44725a3dc975468dca0f96341793455d2fd8674.zip |
Work around crash in The Dig, which occurs when the music reaches the
end
svn-id: r5123
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/bundle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scumm/bundle.cpp b/scumm/bundle.cpp index 80ca8eb487..c5ec9344e0 100644 --- a/scumm/bundle.cpp +++ b/scumm/bundle.cpp @@ -224,6 +224,11 @@ int32 Bundle::decompressVoiceSampleByName(char *name, byte *comp_final) { int32 Bundle::decompressMusicSampleByName(char *name, int32 number, byte *comp_final) { int32 final_size = 0, i; + if (!name) { + warning("Bundle: decompressMusicSampleByName called with no name!"); + return 0; + } + if (_musicFile.isOpen() == false) { warning("Bundle: music file is not open!"); return 0; |