aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r--engines/agi/detection.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index a0736d0cc3..93fcd2d283 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -258,12 +258,7 @@ SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int sl
char saveVersion = in->readByte();
if (saveVersion >= 4) {
- Graphics::Surface *thumbnail = new Graphics::Surface();
- assert(thumbnail);
- if (!Graphics::loadThumbnail(*in, *thumbnail)) {
- delete thumbnail;
- thumbnail = 0;
- }
+ Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in);
desc.setThumbnail(thumbnail);