From ce2e1b08132831fe770ec48d1e73eb4edd21c5b5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 20 Feb 2024 23:31:18 +0530 Subject: [PATCH] Ensure we dont pass a NULL pointer to wl_pointer_set_cursor() Possible fix for #7139 --- glfw/wl_window.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glfw/wl_window.c b/glfw/wl_window.c index a2cf75fbf..faea37dbb 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -207,6 +207,7 @@ setCursorImage(_GLFWwindow* window, bool on_theme_change) { struct wl_buffer* buffer = NULL; struct wl_surface* surface = _glfw.wl.cursorSurface; const int scale = window->wl.scale; + if (!_glfw.wl.pointer) return; if (cursorWayland->scale < 0) { buffer = cursorWayland->buffer;