[Scummvm-cvs-logs] scummvm master -> 83f193edbd97af01904c45934bfaafb4c11efecc

dreammaster dreammaster at scummvm.org
Sat Mar 3 04:14:31 CET 2012


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:
83f193edbd TSAGE: Fix memory leak and error in R2R Animation Player free


Commit: 83f193edbd97af01904c45934bfaafb4c11efecc
    https://github.com/scummvm/scummvm/commit/83f193edbd97af01904c45934bfaafb4c11efecc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2012-03-02T19:13:40-08:00

Commit Message:
TSAGE: Fix memory leak and error in R2R Animation Player free

Changed paths:
    engines/tsage/graphics.cpp
    engines/tsage/ringworld2/ringworld2_logic.cpp



diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index 5ddc7b6..b3dceba 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -223,11 +223,13 @@ GfxSurface::GfxSurface() : _bounds(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT) {
 	_lockSurfaceCtr = 0;
 	_customSurface = NULL;
 	_transColor = -1;
+	_trackDirtyRects = false;
 }
 
 GfxSurface::GfxSurface(const GfxSurface &s) {
 	_lockSurfaceCtr = 0;
 	_customSurface = NULL;
+	_trackDirtyRects = false;
 	this->operator =(s);
 }
 
diff --git a/engines/tsage/ringworld2/ringworld2_logic.cpp b/engines/tsage/ringworld2/ringworld2_logic.cpp
index fb5f4a0..4cfcc29 100644
--- a/engines/tsage/ringworld2/ringworld2_logic.cpp
+++ b/engines/tsage/ringworld2/ringworld2_logic.cpp
@@ -1927,7 +1927,8 @@ void AnimationPlayer::close() {
 	_animData2 = NULL;
 
 	_field38 = 0;
-	R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr, 0);
+	if (g_globals != NULL)
+		R2_GLOBALS._animationCtr = MAX(R2_GLOBALS._animationCtr, 0);
 }
 
 void AnimationPlayer::rleDecode(const byte *pSrc, byte *pDest, int size) {






More information about the Scummvm-git-logs mailing list