diff --git a/src/wayland/shell/wlr_layer/mod.rs b/src/wayland/shell/wlr_layer/mod.rs index 60f3c774e6bf..de9ef18f238f 100644 --- a/src/wayland/shell/wlr_layer/mod.rs +++ b/src/wayland/shell/wlr_layer/mod.rs @@ -484,6 +484,10 @@ impl LayerSurface { compositor::with_states(surface, |states| { let mut role = states.data_map.get::().unwrap().lock().unwrap(); + if !role.surface.alive() { + return; + } + let mut guard_layer = states.cached_state.get::(); let pending = guard_layer.pending();