From bcfd31ce9ea9ea067b285a78eb747e3d68561bca Mon Sep 17 00:00:00 2001 From: kkard2 Date: Mon, 22 Sep 2025 22:13:10 +0200 Subject: make x11 run again --- examples/platform/platform_win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/platform/platform_win32.c') diff --git a/examples/platform/platform_win32.c b/examples/platform/platform_win32.c index 5984e75..76cca72 100644 --- a/examples/platform/platform_win32.c +++ b/examples/platform/platform_win32.c @@ -32,7 +32,7 @@ int update_canvas(sponge_Texture *canvas, float **depths, uint32_t new_width, ui float *new_depths = malloc(new_count * sizeof(float)); if (!new_pixels_buffer || !new_depths) { free(new_pixels_buffer); - free(new_pixels_buffer); + free(new_depths); return 0; } free(canvas->pixels); @@ -43,7 +43,7 @@ int update_canvas(sponge_Texture *canvas, float **depths, uint32_t new_width, ui } canvas->width = new_width; canvas->height = new_height; - canvas->stride_pixels = new_width; // TODO(kard): think about this if we want image to stay the same without redraw + canvas->stride_pixels = new_width; ZeroMemory(&bmi, sizeof(bmi)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); -- cgit v1.3.1