[Scummvm-cvs-logs] SF.net SVN: scummvm:[49994] scummvm/trunk/engines/sci/sound/midiparser_sci. cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jun 18 04:16:00 CEST 2010


Revision: 49994
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49994&view=rev
Author:   thebluegr
Date:     2010-06-18 02:16:00 +0000 (Fri, 18 Jun 2010)

Log Message:
-----------
Changed an assert into a warning with a FIXME (happens in SQ1)

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sound/midiparser_sci.cpp

Modified: scummvm/trunk/engines/sci/sound/midiparser_sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-06-18 02:09:12 UTC (rev 49993)
+++ scummvm/trunk/engines/sci/sound/midiparser_sci.cpp	2010-06-18 02:16:00 UTC (rev 49994)
@@ -160,7 +160,12 @@
 		return;
 	// Channel remapping
 	int16 realChannel = _channelRemap[midiChannel];
-	assert(realChannel != -1);
+	if (realChannel == -1) {
+		// FIXME: Happens in SQ1VGA when the game starts
+		warning("Attempt to send to uninitialized channel %d", midiChannel);
+		return;
+	}
+
 	b = (b & 0xFFFFFFF0) | realChannel;
 	_driver->send(b);
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list