Fix xrandr-related crash.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5999 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-08-04 21:17:04 +00:00
parent 14e7517b16
commit 9c9a540635
1 changed files with 1 additions and 1 deletions

View File

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