mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 07:26:55 +01:00
Fix SIGSEGV on output destroy
``` Program terminated with signal SIGSEGV, Segmentation fault. 144 struct wlr_layer_surface_v1 *layer_surface = surface->layer_surface; [Current thread is 1 (Thread 0x7f1f7c5b3ac0 (LWP 2473))] (gdb) bt ``` Add a NULL check in `find_mapped_layer_by_client` like the one in `arrange_surface`.
This commit is contained in:
parent
08a06a7b6b
commit
2c2625acd3
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ static struct sway_layer_surface *find_mapped_layer_by_client(
|
||||||
wl_list_for_each (node, &output->layers.shell_overlay->children, link) {
|
wl_list_for_each (node, &output->layers.shell_overlay->children, link) {
|
||||||
struct sway_layer_surface *surface = scene_descriptor_try_get(node,
|
struct sway_layer_surface *surface = scene_descriptor_try_get(node,
|
||||||
SWAY_SCENE_DESC_LAYER_SHELL);
|
SWAY_SCENE_DESC_LAYER_SHELL);
|
||||||
|
if (!surface) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
struct wlr_layer_surface_v1 *layer_surface = surface->layer_surface;
|
struct wlr_layer_surface_v1 *layer_surface = surface->layer_surface;
|
||||||
struct wl_resource *resource = layer_surface->resource;
|
struct wl_resource *resource = layer_surface->resource;
|
||||||
|
|
Loading…
Reference in a new issue