[Scummvm-cvs-logs] scummvm master -> bc8486a76b7347d9342bc057708d45ab549461ae

Strangerke Strangerke at scummvm.org
Wed Mar 5 08:18:31 CET 2014


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:
bc8486a76b VOYEUR: Fix memory leak when quitting in showTitleScreen()


Commit: bc8486a76b7347d9342bc057708d45ab549461ae
    https://github.com/scummvm/scummvm/commit/bc8486a76b7347d9342bc057708d45ab549461ae
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-03-04T23:16:49-08:00

Commit Message:
VOYEUR: Fix memory leak when quitting in showTitleScreen()

Changed paths:
    engines/voyeur/voyeur.cpp



diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index b4c9fbe..0406ba0 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -381,41 +381,46 @@ bool VoyeurEngine::doLock() {
 }
 
 void VoyeurEngine::showTitleScreen() {
-	if (_bVoy->getBoltGroup(0x500)) {
-		_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
-
-		(*_graphicsManager->_vPort)->setupViewPort();
-		flipPageAndWait();
-
-		// Immediate palette load to show the initial screen
-		CMapResource *cMap = _bVoy->getCMapResource(0x501);
-		assert(cMap);
-		cMap->_steps = 60;
-		cMap->startFade();
+	if (!_bVoy->getBoltGroup(0x500))
+		return;
 
-		// Wait briefly
-		_eventsManager->delayClick(200);
-		if (shouldQuit())
-			return;
+	_graphicsManager->_backgroundPage = _bVoy->getPictureResource(0x500);
 
-		// Fade out the screen
-		cMap = _bVoy->getCMapResource(0x504);
-		cMap->_steps = 30;
-		cMap->startFade();
+	(*_graphicsManager->_vPort)->setupViewPort();
+	flipPageAndWait();
 
-		flipPageAndWaitForFade();
-		if (shouldQuit())
-			return;
+	// Immediate palette load to show the initial screen
+	CMapResource *cMap = _bVoy->getCMapResource(0x501);
+	assert(cMap);
+	cMap->_steps = 60;
+	cMap->startFade();
 
-		_graphicsManager->screenReset();
-		_eventsManager->delayClick(200);
+	// Wait briefly
+	_eventsManager->delayClick(200);
+	if (shouldQuit()) {
+		_bVoy->freeBoltGroup(0x500);
+		return;
+	}
 
-		// Voyeur title
-		playRL2Video("a1100100.rl2");
-		_graphicsManager->screenReset();
+	// Fade out the screen
+	cMap = _bVoy->getCMapResource(0x504);
+	cMap->_steps = 30;
+	cMap->startFade();
 
+	flipPageAndWaitForFade();
+	if (shouldQuit()) {
 		_bVoy->freeBoltGroup(0x500);
+		return;
 	}
+
+	_graphicsManager->screenReset();
+	_eventsManager->delayClick(200);
+
+	// Voyeur title
+	playRL2Video("a1100100.rl2");
+	_graphicsManager->screenReset();
+
+	_bVoy->freeBoltGroup(0x500);
 }
 
 void VoyeurEngine::doOpening() {






More information about the Scummvm-git-logs mailing list