mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Bail from setting gamma on destroyed resource
This commit is contained in:
		
							parent
							
								
									c1a6422b33
								
							
						
					
					
						commit
						0260f042d2
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -51,6 +51,10 @@ static void gamma_control_set_gamma(struct wl_client *client,
 | 
				
			||||||
	struct wlr_gamma_control *gamma_control =
 | 
						struct wlr_gamma_control *gamma_control =
 | 
				
			||||||
		gamma_control_from_resource(gamma_control_resource);
 | 
							gamma_control_from_resource(gamma_control_resource);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (gamma_control == NULL) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (red->size != green->size || red->size != blue->size) {
 | 
						if (red->size != green->size || red->size != blue->size) {
 | 
				
			||||||
		wl_resource_post_error(gamma_control_resource,
 | 
							wl_resource_post_error(gamma_control_resource,
 | 
				
			||||||
			GAMMA_CONTROL_ERROR_INVALID_GAMMA,
 | 
								GAMMA_CONTROL_ERROR_INVALID_GAMMA,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue