From 032c0d5d767dcfb1d838db6398b062cd1bf87fde Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Thu, 6 Mar 2014 21:11:42 +0100 Subject: [PATCH] MYST3: Fix crash when trying to load an empty slot from the launcher --- engines/myst3/detection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/myst3/detection.cpp b/engines/myst3/detection.cpp index d95fb4d1f6a..6aecdf557e4 100644 --- a/engines/myst3/detection.cpp +++ b/engines/myst3/detection.cpp @@ -235,6 +235,11 @@ public: virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const { SaveStateDescriptor saveInfos = getSaveDescription(target, slot); + if (saveInfos.getDescription().empty()) { + // Unused slot + return SaveStateDescriptor(); + } + // Open save Common::InSaveFile *saveFile = g_system->getSavefileManager()->openForLoading(saveInfos.getDescription());