Don't crash when xf86vmode extension isn't available (and when xrandr failed/was disabled)

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5437 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-03-22 23:33:25 +00:00
parent 372bee5b8b
commit a8b30e3008

View file

@ -3980,7 +3980,7 @@ static qboolean X11VID_Init (rendererstate_t *info, unsigned char *palette, int
else
#endif
#ifdef USE_VMODE
if (!xrandr.origgamma)
if (!xrandr.origgamma && vm.pXF86VidModeGetGammaRampSize)
{
int rampsize = 256;
vm.pXF86VidModeGetGammaRampSize(vid_dpy, scrnum, &rampsize);