Prevent using a wlr_layer_surface after destroying it, due to no available outputs
This commit is contained in:
		
				
					committed by
					
						
						Leonardo Hernández
					
				
			
			
				
	
			
			
			
						parent
						
							797e0c74b2
						
					
				
				
					commit
					0729f18dce
				
			
							
								
								
									
										4
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								dwl.c
									
									
									
									
									
								
							@@ -836,8 +836,10 @@ createlayersurface(struct wl_listener *listener, void *data)
 | 
			
		||||
	if (!wlr_layer_surface->output)
 | 
			
		||||
		wlr_layer_surface->output = selmon ? selmon->wlr_output : NULL;
 | 
			
		||||
 | 
			
		||||
	if (!wlr_layer_surface->output)
 | 
			
		||||
	if (!wlr_layer_surface->output) {
 | 
			
		||||
		wlr_layer_surface_v1_destroy(wlr_layer_surface);
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	layersurface = ecalloc(1, sizeof(LayerSurface));
 | 
			
		||||
	layersurface->type = LayerShell;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user