X11: check crtcInfo for NULL when polling monitors

This commit is contained in:
Drew Weymouth
2025-09-06 07:33:27 -07:00
committed by Doug Binks
parent 6de70d8252
commit 4df5129529
3 changed files with 7 additions and 0 deletions

View File

@@ -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;