Fix crash in x11_display_server_get_screen_orientation

This commit is contained in:
Vladimir Serbinenko 2020-05-23 21:28:54 +02:00
parent cde22645e5
commit cfe68a4c2d

View File

@ -482,6 +482,8 @@ static enum rotation x11_display_server_get_screen_orientation(void)
int i, j;
Display *dpy = x11_display_server_open_display();
XRRScreenResources *screen = XRRGetScreenResources(dpy, DefaultRootWindow(dpy));
if (!screen)
return ORIENTATION_NORMAL;
XRRScreenConfiguration *config = XRRGetScreenInfo(dpy, DefaultRootWindow(dpy));
enum rotation rotation = ORIENTATION_NORMAL;