aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-04-16 15:10:38 +0100
committerGitHub <noreply@github.com>2018-04-16 15:10:38 +0100
commit7c8c81c3a41e7145b69af4556a6a04d16b8cbad2 (patch)
tree1a347fa8777a7ca89f7a2ebc56ac433ad5ab1398
parent72411a7a7cf41d95c21940a0f905231e688b4ca4 (diff)
parent47e1eda6695703eac9d0c84d7fd23bee41499ece (diff)
Merge pull request #871 from agx/layer-shell-crash
rootston: don't crash on shutdown
-rw-r--r--rootston/layer_shell.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c
index 9794071b..895b0385 100644
--- a/rootston/layer_shell.c
+++ b/rootston/layer_shell.c
@@ -270,8 +270,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
wl_list_remove(&layer->map.link);
wl_list_remove(&layer->unmap.link);
wl_list_remove(&layer->surface_commit.link);
- wl_list_remove(&layer->output_destroy.link);
- arrange_layers((struct roots_output *)layer->layer_surface->output->data);
+ if (layer->layer_surface->output) {
+ wl_list_remove(&layer->output_destroy.link);
+ arrange_layers((struct roots_output *)layer->layer_surface->output->data);
+ }
free(layer);
}