From 2c0bc79be14a2cc8b754177869fca27ae39356c8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 24 Mar 2025 14:23:32 +0530 Subject: [PATCH] Typo causing crash on Waylnd compositors that dont support xdg-toplevel-icon Fix #8471 --- docs/changelog.rst | 4 ++++ glfw/wl_window.c | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index c08a8d46a..91c5771b5 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -118,6 +118,10 @@ Detailed list of changes applications that dont specify a destination in the escape code not working (:iss:`8459`) +- Wayland: Fix a regression in the previous release that caused crashes on + compositors that dont support the xdg-toplevel-icon protocol and the user has + set a custom kitty icon (:iss:`8471`) + 0.40.1 [2025-03-18] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/wl_window.c b/glfw/wl_window.c index b56b964b8..a58badf5e 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1474,6 +1474,7 @@ _glfwPlatformSetWindowIcon(_GLFWwindow* window, int count, const GLFWimage* imag _glfwInputError(GLFW_FEATURE_UNAVAILABLE, "Wayland: The compositor does not support changing window icons"); warned_once = true; } + return; } if (!count) { xdg_toplevel_icon_manager_v1_set_icon(_glfw.wl.xdg_toplevel_icon_manager_v1, window->wl.xdg.toplevel, NULL);