mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Win32: Add missing out parameter NULL checks
This fixes _glfwPlatformGetMonitorWorkarea not checking if its out parameters were NULL. Related to #1322.
This commit is contained in:
parent
5c752355cb
commit
f7733c7b4f
@ -377,9 +377,13 @@ void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos
|
||||
hMonitor = MonitorFromPoint( pointInMonitor, 0 );
|
||||
GetMonitorInfo(hMonitor, &monitorInfo);
|
||||
|
||||
if (xpos)
|
||||
*xpos = monitorInfo.rcWork.left;
|
||||
if (ypos)
|
||||
*ypos = monitorInfo.rcWork.top;
|
||||
if (width)
|
||||
*width = monitorInfo.rcWork.right - monitorInfo.rcWork.left;
|
||||
if (height)
|
||||
*height = monitorInfo.rcWork.bottom - monitorInfo.rcWork.top;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user