diff options
Diffstat (limited to 'engines/hugo')
-rw-r--r-- | engines/hugo/detection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp index 4e4746c002..6d2fec5421 100644 --- a/engines/hugo/detection.cpp +++ b/engines/hugo/detection.cpp @@ -241,7 +241,12 @@ SaveStateDescriptor HugoMetaEngine::querySaveMetaInfos(const char *target, int s SaveStateDescriptor desc(slot, saveName); - Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*file); + Graphics::Surface *thumbnail; + if (!Graphics::loadThumbnail(*file, thumbnail)) { + warning("Missing or broken savegame thumbnail"); + delete file; + return SaveStateDescriptor(); + } desc.setThumbnail(thumbnail); uint32 saveDate = file->readUint32BE(); |