[Scummvm-cvs-logs] scummvm master -> 0231eb22a5e41a1b2b14d649cae5c405ee1fd3ec

dreammaster dreammaster at scummvm.org
Sun Oct 11 23:31:16 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:
0231eb22a5 SHERLOCK: RT: Fix memory leak in TattooPerson


Commit: 0231eb22a5e41a1b2b14d649cae5c405ee1fd3ec
    https://github.com/scummvm/scummvm/commit/0231eb22a5e41a1b2b14d649cae5c405ee1fd3ec
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-10-11T17:30:43-04:00

Commit Message:
SHERLOCK: RT: Fix memory leak in TattooPerson

Changed paths:
    engines/sherlock/tattoo/tattoo_people.cpp
    engines/sherlock/tattoo/tattoo_people.h



diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index 46d91ce..0af8def 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -121,12 +121,13 @@ TattooPerson::TattooPerson() : Person() {
 	_lookHolmes = false;
 }
 
-void TattooPerson::freeAltGraphics() {
-	if (_altImages != nullptr) {
-		delete _altImages;
-		_altImages = nullptr;
-	}
+TattooPerson::~TattooPerson() {
+	delete _altImages;
+}
 
+void TattooPerson::freeAltGraphics() {
+	delete _altImages;
+	_altImages = nullptr;
 	_altSeq = 0;
 }
 
diff --git a/engines/sherlock/tattoo/tattoo_people.h b/engines/sherlock/tattoo/tattoo_people.h
index 722c4a9..e0d53c6 100644
--- a/engines/sherlock/tattoo/tattoo_people.h
+++ b/engines/sherlock/tattoo/tattoo_people.h
@@ -128,7 +128,7 @@ public:
 	bool _lookHolmes;
 public:
 	TattooPerson();
-	virtual ~TattooPerson() {}
+	virtual ~TattooPerson();
 
 	/**
 	 * Clear the NPC related data






More information about the Scummvm-git-logs mailing list