Check for clientGone before sending events from XFixes (bug #1753).
Freeing resources during client closedown can cause cursor changes which attempt to send cursor events through the XFixes extension; a client in the process of closing down has no file to send events to, causing a crash when this path is hit.
This commit is contained in:
		
							parent
							
								
									4660eaaffb
								
							
						
					
					
						commit
						8a42af6a93
					
				| 
						 | 
				
			
			@ -143,7 +143,8 @@ CursorDisplayCursor (ScreenPtr pScreen,
 | 
			
		|||
	CursorCurrent = pCursor;
 | 
			
		||||
	for (e = cursorEvents; e; e = e->next)
 | 
			
		||||
	{
 | 
			
		||||
	    if (e->eventMask & XFixesDisplayCursorNotifyMask)
 | 
			
		||||
	    if ((e->eventMask & XFixesDisplayCursorNotifyMask) &&
 | 
			
		||||
		!e->pClient->clientGone)
 | 
			
		||||
	    {
 | 
			
		||||
		xXFixesCursorNotifyEvent	ev;
 | 
			
		||||
		ev.type = XFixesEventBase + XFixesCursorNotify;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,9 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args)
 | 
			
		|||
    }
 | 
			
		||||
    for (e = selectionEvents; e; e = e->next)
 | 
			
		||||
    {
 | 
			
		||||
	if (e->selection == selection->selection && (e->eventMask & eventMask))
 | 
			
		||||
	if (e->selection == selection->selection && 
 | 
			
		||||
	    (e->eventMask & eventMask) &&
 | 
			
		||||
	    !e->pClient->clientGone)
 | 
			
		||||
	{
 | 
			
		||||
	    xXFixesSelectionNotifyEvent	ev;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue