mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	fix segfault when unlocking swaylock on two monitor setup
wlr_*_surface_from_wlr_surface() can return NULL if the surface is being destroyed Fixes: https://github.com/djpohly/dwl/issues/305
This commit is contained in:
		
							parent
							
								
									ba7dcb2dea
								
							
						
					
					
						commit
						bcc8ce7a40
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								dwl.c
									
										
									
									
									
								
							| 
						 | 
					@ -1175,7 +1175,7 @@ focusclient(Client *c, int lift)
 | 
				
			||||||
			struct wlr_layer_surface_v1 *wlr_layer_surface =
 | 
								struct wlr_layer_surface_v1 *wlr_layer_surface =
 | 
				
			||||||
				wlr_layer_surface_v1_from_wlr_surface(old);
 | 
									wlr_layer_surface_v1_from_wlr_surface(old);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (wlr_layer_surface->mapped && (
 | 
								if (wlr_layer_surface && wlr_layer_surface->mapped && (
 | 
				
			||||||
						wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP ||
 | 
											wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_TOP ||
 | 
				
			||||||
						wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
 | 
											wlr_layer_surface->current.layer == ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
 | 
				
			||||||
						))
 | 
											))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue