modes: Protect xf86_crtc_supports_gamma() from non-RandR 1.2 drivers.
This commit is contained in:
parent
317f2b4a9f
commit
f716e3f344
|
@ -3155,15 +3155,19 @@ xf86_crtc_notify(ScreenPtr screen)
|
||||||
Bool
|
Bool
|
||||||
xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
|
xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
|
||||||
{
|
{
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
if (xf86CrtcConfigPrivateIndex != -1) {
|
||||||
xf86CrtcPtr crtc;
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||||
|
xf86CrtcPtr crtc;
|
||||||
|
|
||||||
if ((xf86CrtcConfigPrivateIndex == -1) || !xf86_config)
|
if (!xf86_config)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (xf86_config->num_crtc == 0)
|
if (xf86_config->num_crtc == 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
crtc = xf86_config->crtc[0];
|
crtc = xf86_config->crtc[0];
|
||||||
|
|
||||||
return (crtc->funcs->gamma_set != NULL);
|
return (crtc->funcs->gamma_set != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue