浏览代码

Ignore CRTCs with no outputs.

Camilla Berglund 12 年之前
父节点
当前提交
35c386b7bb
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/x11_monitor.c

+ 6 - 0
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++)