mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	cursor: Fix crash when creating a cursor constraint
Fix crash when creating a cursor constraint and there is no currently focused view. Fixes a crash starting Warhammer 40,000: Dawn of War II (15620)
This commit is contained in:
		
							parent
							
								
									79b1630724
								
							
						
					
					
						commit
						a74060381b
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -410,7 +410,7 @@ create_constraint(struct wl_listener *listener, void *data)
 | 
			
		|||
	wl_signal_add(&wlr_constraint->events.destroy, &constraint->destroy);
 | 
			
		||||
 | 
			
		||||
	view = desktop_focused_view(server);
 | 
			
		||||
	if (view->surface == wlr_constraint->surface) {
 | 
			
		||||
	if (view && view->surface == wlr_constraint->surface) {
 | 
			
		||||
		constrain_cursor(server, wlr_constraint);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue