aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/detection.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/avalanche/detection.cpp b/engines/avalanche/detection.cpp
index def395b77f..64634dc017 100644
--- a/engines/avalanche/detection.cpp
+++ b/engines/avalanche/detection.cpp
@@ -193,7 +193,12 @@ SaveStateDescriptor AvalancheMetaEngine::querySaveMetaInfos(const char *target,
SaveStateDescriptor desc(slot, description);
- Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*f);
+ Graphics::Surface *thumbnail;
+ if (!Graphics::loadThumbnail(*f, thumbnail)) {
+ warning("Cannot read thumbnail data, possibly broken savegame");
+ delete f;
+ return SaveStateDescriptor();
+ }
desc.setThumbnail(thumbnail);
delete f;