From 8927b29a6922cc1db6f3fa7c9c7d4066758e83be Mon Sep 17 00:00:00 2001 From: KaDiWa Date: Sun, 12 Dec 2021 23:06:17 +0100 Subject: [PATCH] macOS: Fix segmentation fault when resizing window (#269) --- src/native/macosx/OSXWindowFrameView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/macosx/OSXWindowFrameView.m b/src/native/macosx/OSXWindowFrameView.m index f676008..a6ab9e3 100644 --- a/src/native/macosx/OSXWindowFrameView.m +++ b/src/native/macosx/OSXWindowFrameView.m @@ -221,7 +221,7 @@ uint32_t upper_power_of_two(uint32_t v) { // Set the pixel dimensions of the texture texture_desc.width = new_width; - texture_desc.height = new_width; + texture_desc.height = new_height; // Allocate the now texture @@ -252,7 +252,7 @@ uint32_t upper_power_of_two(uint32_t v) { draw_state->texture = texture; draw_state->texture_width = new_width; - draw_state->texture_height = new_width; + draw_state->texture_height = new_height; } // Calculate the number of bytes per row of our image.