mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix another crash when moving out of stacks or tabs
This commit is contained in:
		
							parent
							
								
									1549fb719a
								
							
						
					
					
						commit
						a3976e2659
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -331,6 +331,10 @@ struct sway_container *container_destroy_noreaping(struct sway_container *con) {
 | 
				
			||||||
	con->destroying = true;
 | 
						con->destroying = true;
 | 
				
			||||||
	list_add(server.destroying_containers, con);
 | 
						list_add(server.destroying_containers, con);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!con->parent) {
 | 
				
			||||||
 | 
							return NULL;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return container_remove_child(con);
 | 
						return container_remove_child(con);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -384,7 +388,7 @@ struct sway_container *container_flatten(struct sway_container *container) {
 | 
				
			||||||
		struct sway_container *child = container->children->items[0];
 | 
							struct sway_container *child = container->children->items[0];
 | 
				
			||||||
		struct sway_container *parent = container->parent;
 | 
							struct sway_container *parent = container->parent;
 | 
				
			||||||
		container_replace_child(container, child);
 | 
							container_replace_child(container, child);
 | 
				
			||||||
		container_destroy(container);
 | 
							container_destroy_noreaping(container);
 | 
				
			||||||
		container = parent;
 | 
							container = parent;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return container;
 | 
						return container;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue