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