diff --git a/src/x11_monitor.c b/src/x11_monitor.c index dbd50463..a5bac66d 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -177,7 +177,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* found) sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root); primary = XRRGetOutputPrimary(_glfw.x11.display, _glfw.x11.root); - monitors = (_GLFWmonitor**) calloc(sr->noutput, sizeof(_GLFWmonitor*)); + monitors = (_GLFWmonitor**) calloc(sr->ncrtc, sizeof(_GLFWmonitor*)); for (i = 0; i < sr->ncrtc; i++) {