Merge branch 'xf86CompatOutput-fix' into 'master'

xf86: check return value of XF86_CRTC_CONFIG_PTR in xf86CompatOutput()

See merge request xorg/xserver!835
This commit is contained in:
benpicco 2025-12-10 05:10:24 +00:00
commit 7c78d6c748

View file

@ -842,7 +842,7 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
if (xf86CrtcConfigPrivateIndex == -1) if (xf86CrtcConfigPrivateIndex == -1)
return NULL; return NULL;
config = XF86_CRTC_CONFIG_PTR(pScrn); config = XF86_CRTC_CONFIG_PTR(pScrn);
if (config->compat_output < 0) if ((config == NULL) || (config->compat_output < 0))
return NULL; return NULL;
return config->output[config->compat_output]; return config->output[config->compat_output];
} }