mi: check for NULL pointer before dereferences it in miPointerSetPosition
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
		
							parent
							
								
									49835eec0c
								
							
						
					
					
						commit
						099946a3ac
					
				| 
						 | 
					@ -497,14 +497,14 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    miPointerPtr        pPointer; 
 | 
					    miPointerPtr        pPointer; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!pDev || !pDev->coreEvents)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pPointer = MIPOINTER(pDev);
 | 
					    pPointer = MIPOINTER(pDev);
 | 
				
			||||||
    pScreen = pPointer->pScreen;
 | 
					    pScreen = pPointer->pScreen;
 | 
				
			||||||
    if (!pScreen)
 | 
					    if (!pScreen)
 | 
				
			||||||
	return;	    /* called before ready */
 | 
						return;	    /* called before ready */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!pDev || !pDev->coreEvents)
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height)
 | 
					    if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
	pScreenPriv = GetScreenPrivate (pScreen);
 | 
						pScreenPriv = GetScreenPrivate (pScreen);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue