mirror of
https://github.com/glfw/glfw.git
synced 2024-11-26 06:14:35 +00:00
Wayland: Fix error type for allocation failure
(cherry picked from commit 152f50cd01
)
This commit is contained in:
parent
7a4813cedd
commit
9340324380
@ -1200,7 +1200,7 @@ int _glfwPlatformInit(void)
|
|||||||
_glfw.wl.clipboardString = calloc(_glfw.wl.clipboardSize, 1);
|
_glfw.wl.clipboardString = calloc(_glfw.wl.clipboardSize, 1);
|
||||||
if (!_glfw.wl.clipboardString)
|
if (!_glfw.wl.clipboardString)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_OUT_OF_MEMORY,
|
||||||
"Wayland: Unable to allocate clipboard memory");
|
"Wayland: Unable to allocate clipboard memory");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1762,7 +1762,7 @@ static GLFWbool growClipboardString(void)
|
|||||||
clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2);
|
clipboard = realloc(clipboard, _glfw.wl.clipboardSize * 2);
|
||||||
if (!clipboard)
|
if (!clipboard)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_OUT_OF_MEMORY,
|
||||||
"Wayland: Impossible to grow clipboard string");
|
"Wayland: Impossible to grow clipboard string");
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user