MYST3: Fix crash when trying to load an empty slot from the launcher

This commit is contained in:
Bastien Bouclet
2014-03-06 21:12:37 +01:00
parent e04d06a138
commit 032c0d5d76
+5
View File
@@ -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());