Merge pull request #871 from agx/layer-shell-crash

rootston: don't crash on shutdown
This commit is contained in:
emersion 2018-04-16 15:10:38 +01:00 committed by GitHub
commit 7c8c81c3a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,8 +270,10 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
wl_list_remove(&layer->map.link); wl_list_remove(&layer->map.link);
wl_list_remove(&layer->unmap.link); wl_list_remove(&layer->unmap.link);
wl_list_remove(&layer->surface_commit.link); wl_list_remove(&layer->surface_commit.link);
if (layer->layer_surface->output) {
wl_list_remove(&layer->output_destroy.link); wl_list_remove(&layer->output_destroy.link);
arrange_layers((struct roots_output *)layer->layer_surface->output->data); arrange_layers((struct roots_output *)layer->layer_surface->output->data);
}
free(layer); free(layer);
} }