diff options
| author | kkard2 <[email protected]> | 2025-09-22 22:13:10 +0200 |
|---|---|---|
| committer | kkard2 <[email protected]> | 2025-09-22 22:13:10 +0200 |
| commit | bcfd31ce9ea9ea067b285a78eb747e3d68561bca (patch) | |
| tree | 6e2ffc638dbd89dae0709bb30f8abfa40188eb98 /examples/platform/platform_win32.c | |
| parent | 42d3b218942d7ece8a15ef9298c8cd13974aa4c9 (diff) | |
make x11 run again
Diffstat (limited to 'examples/platform/platform_win32.c')
| -rw-r--r-- | examples/platform/platform_win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |
