[Scummvm-cvs-logs] SF.net SVN: scummvm: [28696] scummvm/trunk/sound/midiparser.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Aug 22 14:20:22 CEST 2007


Revision: 28696
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28696&view=rev
Author:   thebluegr
Date:     2007-08-22 05:20:21 -0700 (Wed, 22 Aug 2007)

Log Message:
-----------
Detach the player callback handler when the music is being unloaded. Fixes bug #1734416 - "AUDIO: ITE: Random crashes with the MIDI parser"

Modified Paths:
--------------
    scummvm/trunk/sound/midiparser.cpp

Modified: scummvm/trunk/sound/midiparser.cpp
===================================================================
--- scummvm/trunk/sound/midiparser.cpp	2007-08-22 11:28:11 UTC (rev 28695)
+++ scummvm/trunk/sound/midiparser.cpp	2007-08-22 12:20:21 UTC (rev 28696)
@@ -407,6 +407,11 @@
 }
 
 void MidiParser::unloadMusic() {
+	if (_driver) {
+		// Detach the player callback handler, to prevent it from
+		// being called while the music is being unloaded
+		_driver->setTimerCallback(NULL, NULL);
+	}
 	resetTracking();
 	allNotesOff();
 	_num_tracks = 0;


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