From 9c9a540635e569fd9e1d5e78f8f4a2ae7aac63f3 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 4 Aug 2021 21:17:04 +0000 Subject: [PATCH] Fix xrandr-related crash. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5999 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_vidlinuxglx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/gl/gl_vidlinuxglx.c b/engine/gl/gl_vidlinuxglx.c index e3770671..cdfb69ec 100644 --- a/engine/gl/gl_vidlinuxglx.c +++ b/engine/gl/gl_vidlinuxglx.c @@ -1107,7 +1107,7 @@ static void XRandR_SelectMode(const char *devicename, int *x, int *y, int *width XRRCrtcInfo *c; xrandr.crtcmode = XRandR_FindBestMode(*width, *height, rate); c = xrandr.crtcinfo; - if (!*width || !*height || c->mode == xrandr.crtcmode->id) + if (!*width || !*height || (xrandr.crtcmode&&c->mode == xrandr.crtcmode->id)) { fullscreenflags |= FULLSCREEN_DESKTOP; Con_Printf("XRRSetCrtcConfig not needed\n");