mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	cursor.c: Do not segfault on missing drag icon
Observed by moving tabs in chromium wayland native (started with --ozone-platform-hint=wayland).
This commit is contained in:
		
							parent
							
								
									3826d7ef36
								
							
						
					
					
						commit
						47912aebb6
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -365,6 +365,11 @@ start_drag(struct wl_listener *listener, void *data)
 | 
			
		|||
	struct wlr_drag *wlr_drag = data;
 | 
			
		||||
	seat->active_view = NULL;
 | 
			
		||||
	seat->drag_icon = wlr_drag->icon;
 | 
			
		||||
	if (!seat->drag_icon) {
 | 
			
		||||
		wlr_log(WLR_ERROR,
 | 
			
		||||
			"Started drag but application did not set a drag icon");
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
	wl_signal_add(&seat->drag_icon->events.destroy, &seat->destroy_drag);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue