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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Tue Jan 27 04:13:14 CET 2009


Revision: 36092
          http://scummvm.svn.sourceforge.net/scummvm/?rev=36092&view=rev
Author:   Kirben
Date:     2009-01-27 03:13:13 +0000 (Tue, 27 Jan 2009)

Log Message:
-----------
Fix regression, the original stream shouldn't be deleted, unless disposeAfterUse is set.

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

Modified: scummvm/trunk/sound/wave.cpp
===================================================================
--- scummvm/trunk/sound/wave.cpp	2009-01-27 03:10:56 UTC (rev 36091)
+++ scummvm/trunk/sound/wave.cpp	2009-01-27 03:13:13 UTC (rev 36092)
@@ -185,6 +185,8 @@
 	data = (byte *)malloc(size);
 	assert(data);
 	stream->read(data, size);
+	if (disposeAfterUse)
+		delete stream;
 
 	// Since we allocated our own buffer for the data, we must set the autofree flag.
 	flags |= Audio::Mixer::FLAG_AUTOFREE;


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