diff --git a/src/x11_monitor.c b/src/x11_monitor.c index 3af827520..74c57ed01 100644 --- a/src/x11_monitor.c +++ b/src/x11_monitor.c @@ -151,6 +151,11 @@ void _glfwPollMonitorsX11(void) } XRRCrtcInfo* ci = XRRGetCrtcInfo(_glfw.x11.display, sr, oi->crtc); + if (!ci) { + XRRFreeOutputInfo(oi); + continue; + } + if (ci->rotation == RR_Rotate_90 || ci->rotation == RR_Rotate_270) { widthMM = oi->mm_height;