Move WasFreedThisFrame to Patch_FreeData

This commit is contained in:
Eidolon 2023-04-16 22:47:53 -05:00
parent 1c4d6e064c
commit 716ba0156e

View file

@ -61,6 +61,8 @@ patch_t *Patch_Create(softwarepatch_t *source, size_t srcsize, void *dest)
return patch;
}
static boolean g_patch_was_freed_this_frame = false;
//
// Frees a patch from memory.
//
@ -97,9 +99,9 @@ static void Patch_FreeData(patch_t *patch)
Z_Free(patch->columnofs);
Z_Free(patch->columns);
}
static boolean g_patch_was_freed_this_frame = false;
g_patch_was_freed_this_frame = true;
}
void Patch_Free(patch_t *patch)
{
@ -108,8 +110,6 @@ void Patch_Free(patch_t *patch)
Patch_FreeData(patch);
Z_Free(patch);
g_patch_was_freed_this_frame = true;
}
boolean Patch_WasFreedThisFrame(void)