[Scummvm-cvs-logs] scummvm master -> 304ac2a7c4a3164504ad292de057f5b821fcbc58

eriktorbjorn eriktorbjorn at telia.com
Wed Jan 2 21:44:33 CET 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:
304ac2a7c4 TINSEL: Fix another Clang analyzer warning


Commit: 304ac2a7c4a3164504ad292de057f5b821fcbc58
    https://github.com/scummvm/scummvm/commit/304ac2a7c4a3164504ad292de057f5b821fcbc58
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-01-02T12:25:51-08:00

Commit Message:
TINSEL: Fix another Clang analyzer warning

Whether or not SaveFailure() can delete the save file, we want to
invalidate the save name because it probably only lives on the
stack so the pointer will become invalid once DoSave() has ended.

Changed paths:
    engines/tinsel/saveload.cpp



diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 2ef92d8..acff196 100644
--- a/engines/tinsel/saveload.cpp
+++ b/engines/tinsel/saveload.cpp
@@ -540,8 +540,8 @@ static void SaveFailure(Common::OutSaveFile *f) {
 	if (f) {
 		delete f;
 		_vm->getSaveFileMan()->removeSavefile(g_SaveSceneName);
-		g_SaveSceneName = NULL;	// Invalidate save name
 	}
+	g_SaveSceneName = NULL;	// Invalidate save name
 	GUI::MessageDialog dialog(_("Failed to save game state to file."));
 	dialog.runModal();
 }






More information about the Scummvm-git-logs mailing list