aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders/tga.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2013-10-26 10:19:24 -0400
committerMatthew Hoops2013-10-26 10:21:08 -0400
commit091bcbf3132f5f78e9814577d444458892183aa9 (patch)
treee1b30e1ef56e3403021159102d41806761c9e8d5 /graphics/decoders/tga.cpp
parent1b3eee6d78438b14b437fa6036ef6a1cf45af578 (diff)
downloadscummvm-rg350-091bcbf3132f5f78e9814577d444458892183aa9.tar.gz
scummvm-rg350-091bcbf3132f5f78e9814577d444458892183aa9.tar.bz2
scummvm-rg350-091bcbf3132f5f78e9814577d444458892183aa9.zip
GRAPHICS: Have TGA's loadStream() call destroy()
Diffstat (limited to 'graphics/decoders/tga.cpp')
-rw-r--r--graphics/decoders/tga.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics/decoders/tga.cpp b/graphics/decoders/tga.cpp
index a9f136d238..bc27f18a49 100644
--- a/graphics/decoders/tga.cpp
+++ b/graphics/decoders/tga.cpp
@@ -50,6 +50,8 @@ void TGADecoder::destroy() {
}
bool TGADecoder::loadStream(Common::SeekableReadStream &tga) {
+ destroy();
+
byte imageType, pixelDepth;
bool success;
success = readHeader(tga, imageType, pixelDepth);