[Scummvm-cvs-logs] CVS: scummvm/sword1 animation.cpp,1.3,1.4

James Brown ender at users.sourceforge.net
Wed Jan 21 00:51:01 CET 2004


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1:/tmp/cvs-serv26433/sword1

Modified Files:
	animation.cpp 
Log Message:
Don't crash if unable to play cutscene music.


Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/animation.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- animation.cpp	20 Jan 2004 13:28:49 -0000	1.3
+++ animation.cpp	21 Jan 2004 08:50:15 -0000	1.4
@@ -308,7 +308,7 @@
 				 */
 
 #ifdef BACKEND_8BIT
-				if (checkPaletteSwitch() || (bgSoundStream == 0) ||
+				if (checkPaletteSwitch() || (bgSoundStream == NULL) ||
                                     (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
 					_scr->plotYUV(lut, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
 
@@ -330,7 +330,7 @@
 
 #else
 
-				if ((bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
+				if ((bgSoundStream == NULL) || (bgSoundStream->getSamplesPlayed()*12/bgSoundStream->getRate()) < (framenum+3)){
 					plotYUV(lookup2, sequence_i->width, sequence_i->height, info->display_fbuf->buf);
 
 					if (bgSoundStream) {





More information about the Scummvm-git-logs mailing list