Quellcode durchsuchen

Ignore CRTCs with no outputs.

Camilla Berglund vor 12 Jahren
Ursprung
Commit
35c386b7bb
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  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++)