From a5e0ba9f6856666c099a8f00bd7ac9354de40654 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Nov 2025 21:56:17 +0530 Subject: [PATCH] macOS: Quick access terminal: Fix a crash when changing font size Cocoa window resize gets triggerred for QAT on font size change causing an out of sequence render but the font data is not yet ready causing the crash. Blank window instead of rendering when font data is not ready in an out of sequence render. Fixes #9178 --- docs/changelog.rst | 2 ++ kitty/glfw.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 88f9aeb66..d0f4b4d7d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -176,6 +176,8 @@ Detailed list of changes - macOS: Add an item to the global menu to Cycle through OS windows +- macOS: Quick access terminal: Fix a crash when changing font size (:iss:`9178`) + - Wayland: Fix ``center-sized`` panels not working on smithay based compositors (:pull:`9117`) - Wayland: Fix scrolling using some mouse wheels that produce "VALUE120" based diff --git a/kitty/glfw.c b/kitty/glfw.c index 49afde4b2..b62d4ae47 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -346,7 +346,8 @@ static void cocoa_out_of_sequence_render(OSWindow *window) { make_os_window_context_current(window); window->needs_render = true; - bool rendered = render_os_window(window, monotonic(), true); + bool rendered = false; + if (window->fonts_data->sprite_map) rendered = render_os_window(window, monotonic(), true); if (!rendered) { blank_os_window(window); swap_window_buffers(window);