XQuartz: Don't FatalError in x_hook_run if the list is empty
Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
This commit is contained in:
		
							parent
							
								
									6bde306f7f
								
							
						
					
					
						commit
						6f6a99abc1
					
				| 
						 | 
					@ -79,6 +79,9 @@ X_PFX (hook_run) (x_list *lst, void *arg)
 | 
				
			||||||
    void **data;
 | 
					    void **data;
 | 
				
			||||||
    int length, i;
 | 
					    int length, i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(!lst)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    length = X_PFX (list_length) (lst);
 | 
					    length = X_PFX (list_length) (lst);
 | 
				
			||||||
    fun = xalloc (sizeof (x_hook_function *) * length);
 | 
					    fun = xalloc (sizeof (x_hook_function *) * length);
 | 
				
			||||||
    data = xalloc (sizeof (void *) * length);
 | 
					    data = xalloc (sizeof (void *) * length);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue