Skip to content

Commit

Permalink
- take down the savegame loader's resources in proper order.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 10, 2021
1 parent 0f46a31 commit 5f3661a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/core/savegamehelp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ bool ReadSavegame(const char* name)
delete savereader;
return false;
}
file.Close();

FResourceLump* info = savereader->FindLump("session.json");
if (info == nullptr)
Expand All @@ -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;
}
Expand Down

0 comments on commit 5f3661a

Please sign in to comment.