diff options
author | Torbjörn Andersson | 2010-01-03 19:37:43 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2010-01-03 19:37:43 +0000 |
commit | 72eb9ec9eab5efcb3aa99a962a80423e8c0a3232 (patch) | |
tree | 032c9107838aefca6a166465a46fa7318bb82566 /engines/cruise | |
parent | 910ffb53a0b6c74a965df9a1270cdfc3885252ec (diff) | |
download | scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.gz scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.tar.bz2 scummvm-rg350-72eb9ec9eab5efcb3aa99a962a80423e8c0a3232.zip |
Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
before freeing it, which isn't necessary.
svn-id: r46941
Diffstat (limited to 'engines/cruise')
-rw-r--r-- | engines/cruise/detection.cpp | 2 | ||||
-rw-r--r-- | engines/cruise/saveload.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index d6095092ac..5fc96ffff2 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -262,7 +262,7 @@ SaveStateList CruiseMetaEngine::listSaves(const char *target) const { Cruise::CruiseSavegameHeader header; Cruise::readSavegameHeader(in, header); saveList.push_back(SaveStateDescriptor(slotNum, header.saveName)); - if (header.thumbnail) delete header.thumbnail; + delete header.thumbnail; delete in; } } diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp index a7351ff700..92cccc7026 100644 --- a/engines/cruise/saveload.cpp +++ b/engines/cruise/saveload.cpp @@ -828,7 +828,7 @@ Common::Error loadSavegameData(int saveGameIdx) { // Skip over the savegame header CruiseSavegameHeader header; readSavegameHeader(f, header); - if (header.thumbnail) delete header.thumbnail; + delete header.thumbnail; // Synchronise the remaining data of the savegame Common::Serializer s(f, NULL); |