Wayland: don't crash if no cursor theme is available

This commit is contained in:
Andre Renaud 2023-06-30 11:12:44 +12:00
parent 3fa2360720
commit 13f0e50a40

View File

@ -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)
{