aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/saveload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cruise/saveload.cpp')
-rw-r--r--engines/cruise/saveload.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 6392009373..c3d1ea6643 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -62,12 +62,9 @@ bool readSavegameHeader(Common::InSaveFile *in, CruiseSavegameHeader &header) {
while ((ch = (char)in->readByte()) != '\0') header.saveName += ch;
// Get the thumbnail
- header.thumbnail = new Graphics::Surface();
- if (!Graphics::loadThumbnail(*in, *header.thumbnail)) {
- delete header.thumbnail;
- header.thumbnail = NULL;
+ header.thumbnail = Graphics::loadThumbnail(*in);
+ if (!header.thumbnail)
return false;
- }
return true;
}