aboutsummaryrefslogtreecommitdiff
path: root/engines/drascula
diff options
context:
space:
mode:
Diffstat (limited to 'engines/drascula')
-rw-r--r--engines/drascula/detection.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 5f453839e7..a1f2f3e117 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -430,7 +430,11 @@ SaveStateDescriptor DrasculaMetaEngine::querySaveMetaInfos(const char *target, i
return SaveStateDescriptor();
}
- Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in);
+ Graphics::Surface *thumbnail;
+ if (!Graphics::loadThumbnail(*in, thumbnail)) {
+ delete in;
+ return SaveStateDescriptor();
+ }
desc.setThumbnail(thumbnail);
delete in;