mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	surface: ensure buffer is reset to NULL in surface_state_move
When surface_state_move processes a NULL commit, make sure to reset state->buffer to NULL instead of leaving behind an old wlr_buffer.
This commit is contained in:
		
							parent
							
								
									0fe3b45361
								
							
						
					
					
						commit
						0978a702d7
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -284,8 +284,9 @@ static void surface_state_move(struct wlr_surface_state *state,
 | 
			
		|||
		surface_state_set_buffer(state, next->buffer_resource);
 | 
			
		||||
		surface_state_reset_buffer(next);
 | 
			
		||||
 | 
			
		||||
		wlr_buffer_unlock(state->buffer);
 | 
			
		||||
		state->buffer = NULL;
 | 
			
		||||
		if (next->buffer) {
 | 
			
		||||
			wlr_buffer_unlock(state->buffer);
 | 
			
		||||
			state->buffer = wlr_buffer_lock(next->buffer);
 | 
			
		||||
		}
 | 
			
		||||
		wlr_buffer_unlock(next->buffer);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue