From 93403243809267204b01dfd1a03aadbc68c8821b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 11 Feb 2022 12:36:35 +0100 Subject: [PATCH] Wayland: Fix error type for allocation failure (cherry picked from commit 152f50cd0149ace9242971bf1bae3a5abde24951) --- src/wl_init.c | 2 +- src/wl_window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 7459953a..0ec99106 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -1200,7 +1200,7 @@ int _glfwPlatformInit(void) _glfw.wl.clipboardString = calloc(_glfw.wl.clipboardSize, 1); if (!_glfw.wl.clipboardString) { - _glfwInputError(GLFW_PLATFORM_ERROR, + _glfwInputError(GLFW_OUT_OF_MEMORY, "Wayland: Unable to allocate clipboard memory"); return GLFW_FALSE; } diff --git a/src/wl_window.c b/src/wl_window.c index 50e701cd..3273362c 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -1762,7 +1762,7 @@ static GLFWbool growClipboardString(void) clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2); if (!clipboard) { - _glfwInputError(GLFW_PLATFORM_ERROR, + _glfwInputError(GLFW_OUT_OF_MEMORY, "Wayland: Impossible to grow clipboard string"); return GLFW_FALSE; }