mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix double iterating in container_for_each_child
This commit is contained in:
		
							parent
							
								
									744724b3cb
								
							
						
					
					
						commit
						1be75fe740
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -737,10 +737,10 @@ void container_for_each_child(struct sway_container *container,
 | 
			
		|||
				container->type == C_VIEW, "Expected a container or view")) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	f(container, data);
 | 
			
		||||
	if (container->children)  {
 | 
			
		||||
		for (int i = 0; i < container->children->length; ++i) {
 | 
			
		||||
			struct sway_container *child = container->children->items[i];
 | 
			
		||||
			f(child, data);
 | 
			
		||||
			container_for_each_child(child, f, data);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue