[Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse_sndmgr.cpp,1.48,1.49

Pawel Kolodziejski aquadran at users.sourceforge.net
Sun Jun 20 06:20:06 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm/imuse_digi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23752/scummvm/scumm/imuse_digi

Modified Files:
	dimuse_sndmgr.cpp 
Log Message:
fix for not finding sample

Index: dimuse_sndmgr.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/imuse_digi/dimuse_sndmgr.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- dimuse_sndmgr.cpp	19 Jun 2004 17:48:06 -0000	1.48
+++ dimuse_sndmgr.cpp	20 Jun 2004 13:19:22 -0000	1.49
@@ -325,7 +325,10 @@
 				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 @@
 				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;





More information about the Scummvm-git-logs mailing list