Merge branch 'profile-startup-save' into 'master'

Profile I_Error on Startup fix (resolves #451)

Closes #451

See merge request KartKrew/Kart!974
This commit is contained in:
Oni 2023-02-26 00:37:27 +00:00
commit 3cf12d42b2

View file

@ -219,6 +219,12 @@ void PR_SaveProfiles(void)
UINT8 i, j, k;
savebuffer_t save = {0};
if (profilesList[PROFILE_GUEST] == NULL)
{
// Profiles have not been loaded yet, don't overwrite with garbage.
return;
}
if (P_SaveBufferAlloc(&save, sizeof(UINT32) + (numprofiles * sizeof(profile_t))) == false)
{
I_Error("No more free memory for saving profiles\n");