Fix segfault when closing xwayland views

This commit is contained in:
emersion 2017-11-20 18:05:24 +01:00
parent c3e0fbdb8f
commit 6a06c3d907
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 10 additions and 3 deletions

View file

@ -181,15 +181,12 @@ bool view_center(struct roots_view *view) {
void view_destroy(struct roots_view *view) {
wl_signal_emit(&view->events.destroy, view);
wl_list_remove(&view->link);
free(view);
}
void view_init(struct roots_view *view, struct roots_desktop *desktop) {
view->desktop = desktop;
wl_signal_init(&view->events.destroy);
wl_list_insert(&desktop->views, &view->link);
}
void view_setup(struct roots_view *view) {