mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	viewporter: fix "has buffer" check
Previously, cases when a viewport source box was updated without attaching a buffer weren't checked for correctness properly because the state's buffer would be NULL. Use wlr_surface_state_has_buffer() instead.
This commit is contained in:
		
							parent
							
								
									538a7a190d
								
							
						
					
					
						commit
						072f6ed977
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -158,7 +158,7 @@ static void viewport_handle_surface_client_commit(struct wl_listener *listener,
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (state->viewport.has_src && state->buffer != NULL &&
 | 
			
		||||
	if (state->viewport.has_src && wlr_surface_state_has_buffer(state) &&
 | 
			
		||||
			!check_src_buffer_bounds(state)) {
 | 
			
		||||
		wlr_surface_reject_pending(viewport->surface,
 | 
			
		||||
			viewport->resource, WP_VIEWPORT_ERROR_OUT_OF_BUFFER,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue