mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Merge pull request #260 from versusvoid/fix-accessing-freed-client
Destroy surfaces on client destruction (XDG shell)
This commit is contained in:
		
						commit
						f73cb2aa1f
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
					@ -1147,8 +1147,7 @@ static void wlr_xdg_client_v6_destroy(struct wl_resource *resource) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_xdg_surface_v6 *surface, *tmp = NULL;
 | 
						struct wlr_xdg_surface_v6 *surface, *tmp = NULL;
 | 
				
			||||||
	wl_list_for_each_safe(surface, tmp, &client->surfaces, link) {
 | 
						wl_list_for_each_safe(surface, tmp, &client->surfaces, link) {
 | 
				
			||||||
		wl_list_remove(&surface->link);
 | 
							xdg_surface_destroy(surface);
 | 
				
			||||||
		wl_list_init(&surface->link);
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (client->ping_timer != NULL) {
 | 
						if (client->ping_timer != NULL) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue