From 22170bde77a92126ab5c183604634bbb2b89a10a Mon Sep 17 00:00:00 2001 From: db Date: Tue, 1 May 2018 17:38:55 +0200 Subject: Fix layer surface crash on output destroy Before freeing sway_output, NULL the wlr_output reference to it. Check for that NULL in layer_shell handle_destroy. Don't damage null container in unmap. Additionaly, terminate swaybg if its output is being disabled. --- sway/tree/container.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway/tree/container.c') diff --git a/sway/tree/container.c b/sway/tree/container.c index 995da5ce..6ac59547 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -156,6 +156,9 @@ static struct sway_container *container_output_destroy( wl_list_remove(&output->sway_output->damage_destroy.link); wl_list_remove(&output->sway_output->damage_frame.link); + // clear the wlr_output reference to this container + output->sway_output->wlr_output->data = NULL; + wlr_log(L_DEBUG, "OUTPUT: Destroying output '%s'", output->name); _container_destroy(output); return &root_container; -- cgit v1.2.3