[Scummvm-cvs-logs] scummvm master -> 0d6fa01408bd1e8b247c75ff441c715d81e23a29

m-kiewitz m_kiewitz at users.sourceforge.net
Tue Sep 15 14:02:44 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0d6fa01408 SHERLOCK: 3DO: SS: fix video player memory leak


Commit: 0d6fa01408bd1e8b247c75ff441c715d81e23a29
    https://github.com/scummvm/scummvm/commit/0d6fa01408bd1e8b247c75ff441c715d81e23a29
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-09-15T14:03:21+02:00

Commit Message:
SHERLOCK: 3DO: SS: fix video player memory leak

Changed paths:
    engines/sherlock/scalpel/scalpel.cpp



diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index a169b90..d407b59 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






More information about the Scummvm-git-logs mailing list