mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix crash when focusing from fullscreen in an invalid direction
* Fullscreen a view * Run `focus <direction>` where there is no output in that direction The output returned was rightfully NULL, which needs to be handled.
This commit is contained in:
		
							parent
							
								
									97474f12e3
								
							
						
					
					
						commit
						8859da1dc3
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -102,6 +102,9 @@ static struct sway_node *node_get_in_direction(struct sway_container *container,
 | 
				
			||||||
		// Fullscreen container with a direction - go straight to outputs
 | 
							// Fullscreen container with a direction - go straight to outputs
 | 
				
			||||||
		struct sway_output *output = container->workspace->output;
 | 
							struct sway_output *output = container->workspace->output;
 | 
				
			||||||
		struct sway_output *new_output = output_get_in_direction(output, dir);
 | 
							struct sway_output *new_output = output_get_in_direction(output, dir);
 | 
				
			||||||
 | 
							if (!new_output) {
 | 
				
			||||||
 | 
								return NULL;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		return get_node_in_output_direction(new_output, dir);
 | 
							return get_node_in_output_direction(new_output, dir);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (dir == MOVE_PARENT) {
 | 
						if (dir == MOVE_PARENT) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue