mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	src/output.c: prevent crash with no outputs available
This commit is contained in:
		
							parent
							
								
									8bde7bcee0
								
							
						
					
					
						commit
						de8042bff5
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -434,6 +434,9 @@ output_from_wlr_output(struct server *server, struct wlr_output *wlr_output)
 | 
			
		|||
struct wlr_box
 | 
			
		||||
output_usable_area_in_layout_coords(struct output *output)
 | 
			
		||||
{
 | 
			
		||||
	if (!output) {
 | 
			
		||||
		return (struct wlr_box){0};
 | 
			
		||||
	}
 | 
			
		||||
	struct wlr_box box = output->usable_area;
 | 
			
		||||
	double ox = 0, oy = 0;
 | 
			
		||||
	wlr_output_layout_output_coords(output->server->output_layout,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue