aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/detection.cpp')
-rw-r--r--engines/sci/detection.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 82f762e3db..33ca3a6c9c 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -676,13 +676,7 @@ SaveStateDescriptor SciMetaEngine::querySaveMetaInfos(const char *target, int sl
SaveStateDescriptor desc(slot, meta.name);
- 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);
desc.setDeletableFlag(true);