diff options
author | Travis Howell | 2009-01-27 03:13:13 +0000 |
---|---|---|
committer | Travis Howell | 2009-01-27 03:13:13 +0000 |
commit | 82a741419728a7c908ee31709051e9a0de0daa10 (patch) | |
tree | 2932469abbd091c9913a2983b32ffff81eb17fa3 | |
parent | bce799366fe3784966db23f9201e02c6c3c95e80 (diff) | |
download | scummvm-rg350-82a741419728a7c908ee31709051e9a0de0daa10.tar.gz scummvm-rg350-82a741419728a7c908ee31709051e9a0de0daa10.tar.bz2 scummvm-rg350-82a741419728a7c908ee31709051e9a0de0daa10.zip |
Fix regression, the original stream shouldn't be deleted, unless disposeAfterUse is set.
svn-id: r36092
-rw-r--r-- | sound/wave.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/wave.cpp b/sound/wave.cpp index c829c41e0f..83cc23c35a 100644 --- a/sound/wave.cpp +++ b/sound/wave.cpp @@ -185,6 +185,8 @@ AudioStream *makeWAVStream(Common::SeekableReadStream *stream, bool disposeAfter 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; |