- take down the savegame loader's resources in proper order.

This commit is contained in:
Christoph Oelckers 2021-05-10 20:02:16 +02:00
parent bdfa13e341
commit d90b23ba9a

View file

@ -133,6 +133,7 @@ bool ReadSavegame(const char* name)
delete savereader;
return false;
}
file.Close();
FResourceLump* info = savereader->FindLump("session.json");
if (info == nullptr)
@ -149,11 +150,12 @@ bool ReadSavegame(const char* name)
delete savereader;
return false;
}
info->Unlock();
// Load the savegame.
loadMapBackup(currentLevel->fileName);
SerializeSession(arc);
arc.Close();
info->Unlock();
delete savereader;
return true;
}