mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-10 13:04:03 +03:00
Dont crash if XRRGetCrtcInfo() returns NULL
This commit is contained in:
parent
e5a720c6fa
commit
ab7f3310c4
6
glfw/x11_monitor.c
vendored
6
glfw/x11_monitor.c
vendored
@ -152,6 +152,11 @@ void _glfwPollMonitorsX11(void)
|
||||
}
|
||||
|
||||
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;
|
||||
@ -501,4 +506,3 @@ GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* handle)
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(None);
|
||||
return monitor->x11.output;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user