From 13f0e50a40e119500a8828e2c73173e8f84089f3 Mon Sep 17 00:00:00 2001 From: Andre Renaud Date: Fri, 30 Jun 2023 11:12:44 +1200 Subject: [PATCH] Wayland: don't crash if no cursor theme is available --- src/wl_window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wl_window.c b/src/wl_window.c index 52d3b9eb..fde02ac8 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -2630,6 +2630,12 @@ GLFWbool _glfwCreateStandardCursorWayland(_GLFWcursor* cursor, int shape) { const char* name = NULL; + if (!_glfw.wl.cursorTheme) { + _glfwInputError(GLFW_CURSOR_UNAVAILABLE, + "Wayland: No cursor theme"); + return GLFW_FALSE; + } + // Try the XDG names first switch (shape) {