mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Added X11 NULL argument checks.
This commit is contained in:
parent
1a1ad508ab
commit
51a8667fcb
@ -346,10 +346,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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user