aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/core
diff options
context:
space:
mode:
authorPaul Gilbert2018-04-22 11:44:15 -0400
committerPaul Gilbert2018-04-22 11:44:15 -0400
commitab3f397e2d3f68eddc0cf66b67ff781cbb2e399d (patch)
treeee064f93b33609efad70ca1ae30f8b76ebd8374e /engines/titanic/core
parent04c321d200e10b60b04d1a5a07dc3936f3d29806 (diff)
downloadscummvm-rg350-ab3f397e2d3f68eddc0cf66b67ff781cbb2e399d.tar.gz
scummvm-rg350-ab3f397e2d3f68eddc0cf66b67ff781cbb2e399d.tar.bz2
scummvm-rg350-ab3f397e2d3f68eddc0cf66b67ff781cbb2e399d.zip
TITANIC: Fix memory leak due to save thumbnail changes
Diffstat (limited to 'engines/titanic/core')
-rw-r--r--engines/titanic/core/project_item.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp
index 6da891c417..424562ffef 100644
--- a/engines/titanic/core/project_item.cpp
+++ b/engines/titanic/core/project_item.cpp
@@ -495,7 +495,7 @@ SaveStateList CProjectItem::getSavegameList(const Common::String &target) {
return saveList;
}
-bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool skipThumbnail) {
+bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &header, bool loadThumbnail) {
char saveIdentBuffer[SAVEGAME_STR_SIZE + 1];
header._thumbnail = nullptr;
header._totalFrames = 0;
@@ -518,7 +518,7 @@ bool CProjectItem::readSavegameHeader(SimpleFile *file, TitanicSavegameHeader &h
while ((ch = (char)file->readByte()) != '\0') header._saveName += ch;
// Get the thumbnail
- if (!Graphics::loadThumbnail(*file, header._thumbnail, skipThumbnail))
+ if (!Graphics::loadThumbnail(*file, header._thumbnail, !loadThumbnail))
return false;
// Read in save date/time