mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-31 12:13:16 +00:00
PR_SaveProfiles: Do not attempt to save if Guest profile data hasn't been initialised yet.
- This only happens at the very end of PR_LoadProfiles, so it marks the clear point data is good. - Resolves #451
This commit is contained in:
parent
afbea1ccc4
commit
e87d4b88ec
1 changed files with 6 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue