[Scummvm-cvs-logs] scummvm master -> 952a119ae16da8795785ca05a3f62ba7f5aee50b

lordhoto lordhoto at gmail.com
Wed Aug 7 21:46:18 CEST 2013


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:
952a119ae1 IPHONE: Fix accidental double free.


Commit: 952a119ae16da8795785ca05a3f62ba7f5aee50b
    https://github.com/scummvm/scummvm/commit/952a119ae16da8795785ca05a3f62ba7f5aee50b
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-08-07T12:41:24-07:00

Commit Message:
IPHONE: Fix accidental double free.

This was a copy&paste error. I also adapted the comment to be more clear.

Changed paths:
    backends/platform/iphone/osys_main.cpp



diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index ea566c3..a814495 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -77,8 +77,8 @@ OSystem_IPHONE::~OSystem_IPHONE() {
 	delete _mixer;
 	// Prevent accidental freeing of the screen texture here. This needs to be
 	// checked since we might use the screen texture as framebuffer in the case
-	// of hi-color games for example.
-	if (_framebuffer.getPixels() == _videoContext->screenTexture.getPixels())
+	// of hi-color games for example. Otherwise this can lead to a double free.
+	if (_framebuffer.getPixels() != _videoContext->screenTexture.getPixels())
 		_framebuffer.free();
 	_mouseBuffer.free();
 }






More information about the Scummvm-git-logs mailing list