mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	scaled-scene-buffer: guard against negative sizes
This commit is contained in:
		
							parent
							
								
									6305cc0f78
								
							
						
					
					
						commit
						849fd7a96f
					
				
					 4 changed files with 13 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -49,7 +49,10 @@ struct scaled_img_buffer *
 | 
			
		|||
scaled_img_buffer_create(struct wlr_scene_tree *parent, struct lab_img *img,
 | 
			
		||||
	int width, int height)
 | 
			
		||||
{
 | 
			
		||||
	assert(parent);
 | 
			
		||||
	assert(img);
 | 
			
		||||
	assert(width >= 0 && height >= 0);
 | 
			
		||||
 | 
			
		||||
	struct scaled_scene_buffer *scaled_buffer = scaled_scene_buffer_create(
 | 
			
		||||
		parent, &impl, /* drop_buffer */ true);
 | 
			
		||||
	struct scaled_img_buffer *self = znew(*self);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue