From 35c386b7bbf7fb1dcba5866c2f89e00b77412b62 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 12 Jun 2013 19:40:55 +0200 Subject: [PATCH] Ignore CRTCs with no outputs. --- src/x11_monitor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/x11_monitor.c b/src/x11_monitor.c index 5e6ac851..72de2d78 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -187,6 +187,12 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count) RROutput output; ci = XRRGetCrtcInfo(_glfw.x11.display, sr, sr->crtcs[i]); + if (ci->noutput == 0) + { + XRRFreeCrtcInfo(ci); + continue; + } + output = ci->outputs[0]; for (j = 0; j < ci->noutput; j++)