realloc last buffer before attempting to reuse it

This commit is contained in:
camh 2022-02-25 12:23:06 -08:00
parent 32b72fe50d
commit ee85a728a7
3 changed files with 2 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1215,6 +1215,8 @@ NK_API void nk_quickdraw_render(WindowPtr window, struct nk_context *ctx) {
PROFILE_START("memcpy commands");
#endif
free(last);
last = calloc(1, MAX_MEMORY_IN_KB * 1024);
memcpy(last, cmds, ctx->memory.allocated);
#ifdef PROFILING