aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kiewitz2015-09-15 14:03:21 +0200
committerMartin Kiewitz2015-09-15 14:03:21 +0200
commit0d6fa01408bd1e8b247c75ff441c715d81e23a29 (patch)
treec6e40fd6dde35b80e86ae9a5828067eef30bc439
parente9efe9ab9065d43dcd55dbcebeb1c9b959200c61 (diff)
downloadscummvm-rg350-0d6fa01408bd1e8b247c75ff441c715d81e23a29.tar.gz
scummvm-rg350-0d6fa01408bd1e8b247c75ff441c715d81e23a29.tar.bz2
scummvm-rg350-0d6fa01408bd1e8b247c75ff441c715d81e23a29.zip
SHERLOCK: 3DO: SS: fix video player memory leak
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index a169b905b9..d407b596c9 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -1267,6 +1267,7 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
Graphics::Surface tempSurface;
Common::Point framePos(pos.x, pos.y);
+ ImageFile3DO *frameImageFile = nullptr;
ImageFrame *frameImage = nullptr;
bool frameShown = false;
@@ -1283,7 +1284,7 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
framePos.y -= 8; // frame is 8 pixels on left + top, and 7 pixels on right + bottom
}
- ImageFile3DO *frameImageFile = new ImageFile3DO("vidframe.cel", kImageFile3DOType_Cel);
+ frameImageFile = new ImageFile3DO("vidframe.cel", kImageFile3DOType_Cel);
frameImage = &(*frameImageFile)[0];
}
@@ -1400,7 +1401,7 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
delete videoDecoder;
if (halfSize) {
- delete frameImage;
+ delete frameImageFile;
}
// Restore scene