mirror of
				https://github.com/wizbright/waybox.git
				synced 2025-10-29 05:40:20 -04:00 
			
		
		
		
	Fixed crash when wlr_xdg_popup doesn't have a parent
This commit is contained in:
		
							parent
							
								
									b2e686171f
								
							
						
					
					
						commit
						db79d83076
					
				
					 1 changed files with 8 additions and 6 deletions
				
			
		|  | @ -411,6 +411,7 @@ static void handle_new_xdg_popup(struct wl_listener *listener, void *data) { | |||
| 	 * we always set the user data field of xdg_surfaces to the corresponding | ||||
| 	 * scene node. */ | ||||
| 	struct wlr_xdg_popup *xdg_popup = data; | ||||
| 	if (xdg_popup->parent) { | ||||
| 		struct wlr_xdg_surface *parent = wlr_xdg_surface_try_from_wlr_surface( | ||||
| 			xdg_popup->parent); | ||||
| 		if (parent != NULL) { | ||||
|  | @ -418,6 +419,7 @@ static void handle_new_xdg_popup(struct wl_listener *listener, void *data) { | |||
| 			xdg_popup->base->data = wlr_scene_xdg_surface_create( | ||||
| 				parent_tree, xdg_popup->base); | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	struct wb_popup *popup = calloc(1, sizeof(struct wb_popup)); | ||||
| 	popup->commit.notify = xdg_popup_commit; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Keith Bowes
						Keith Bowes