aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel
diff options
context:
space:
mode:
authorTorbjörn Andersson2013-01-02 21:25:51 +0100
committerTorbjörn Andersson2013-01-02 21:25:51 +0100
commit304ac2a7c4a3164504ad292de057f5b821fcbc58 (patch)
treeb39f2c814459899708cef449098341b99472685b /engines/tinsel
parent5e304618bfa581742329c2d42e661f69755a6c91 (diff)
downloadscummvm-rg350-304ac2a7c4a3164504ad292de057f5b821fcbc58.tar.gz
scummvm-rg350-304ac2a7c4a3164504ad292de057f5b821fcbc58.tar.bz2
scummvm-rg350-304ac2a7c4a3164504ad292de057f5b821fcbc58.zip
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.
Diffstat (limited to 'engines/tinsel')
-rw-r--r--engines/tinsel/saveload.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp
index 2ef92d853f..acff196916 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();
}