aboutsummaryrefslogtreecommitdiff
path: root/sound/decoders/aiff.cpp
diff options
context:
space:
mode:
authorAlejandro Marzini2010-07-30 05:28:09 +0000
committerAlejandro Marzini2010-07-30 05:28:09 +0000
commitfb4086cadb8ce3e473dae40558d713e7a31b3858 (patch)
tree95c19d544da914c43a43f0538a1977f43e17cb39 /sound/decoders/aiff.cpp
parent7b070bbef8275ff25dfc2cbc3106acfdc8de74a5 (diff)
parenta17e3c444917ca90dfd537c2102a6150e7ffe977 (diff)
downloadscummvm-rg350-fb4086cadb8ce3e473dae40558d713e7a31b3858.tar.gz
scummvm-rg350-fb4086cadb8ce3e473dae40558d713e7a31b3858.tar.bz2
scummvm-rg350-fb4086cadb8ce3e473dae40558d713e7a31b3858.zip
Merged from trunk, from Rev 50841 to HEAD
svn-id: r51495
Diffstat (limited to 'sound/decoders/aiff.cpp')
-rw-r--r--sound/decoders/aiff.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/decoders/aiff.cpp b/sound/decoders/aiff.cpp
index b76410f8d1..ce8c6ad32c 100644
--- a/sound/decoders/aiff.cpp
+++ b/sound/decoders/aiff.cpp
@@ -175,7 +175,9 @@ SeekableAudioStream *makeAIFFStream(Common::SeekableReadStream *stream,
data = (byte *)malloc(size);
assert(data);
stream->read(data, size);
- delete stream;
+
+ if (disposeAfterUse == DisposeAfterUse::YES)
+ delete stream;
// Since we allocated our own buffer for the data, we must specify DisposeAfterUse::YES.
return makeRawStream(data, size, rate, flags);