1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

X11: Add NULL checks in work area retrieval

Related to #1322.
This commit is contained in:
Doug Binks 2018-09-08 18:00:19 +02:00 committed by Camilla Löwy
parent f1d40fa046
commit bea4818030

View File

@ -350,10 +350,15 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
_glfwGetWindowPropertyX11(_glfw.x11.root, _glfw.x11.NET_WORKAREA, XA_CARDINAL, (unsigned char**) &extents); _glfwGetWindowPropertyX11(_glfw.x11.root, _glfw.x11.NET_WORKAREA, XA_CARDINAL, (unsigned char**) &extents);
if (xpos)
*xpos = extents[0]; *xpos = extents[0];
if (xpos)
*ypos = extents[1]; *ypos = extents[1];
if (xpos)
*width = extents[2]; *width = extents[2];
if (xpos)
*height = extents[3]; *height = extents[3];
XFree(extents); XFree(extents);
} }
} }