[lib][gfx] fix undefined flush pointer

all places that call flush, check if its null before calling it
but its never actually written to, so it can sometimes point to garbage and just fault
This commit is contained in:
Michael Bishop
2022-09-21 05:14:54 -03:00
committed by Travis Geiselbrecht
parent 368b5f69b8
commit 95ac371146

View File

@@ -614,6 +614,7 @@ gfx_surface *gfx_create_surface(void *ptr, uint width, uint height, uint stride,
surface->free_on_destroy = true;
}
surface->ptr = ptr;
surface->flush = NULL;
return surface;
}