rootston: fix segfault when destroying unmapped fullscreen views

This commit is contained in:
emersion 2018-10-28 23:15:36 +01:00
parent 1454d1c8f8
commit 0c7371221c
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 5 additions and 0 deletions

View File

@ -439,6 +439,11 @@ void view_destroy(struct roots_view *view) {
view_unmap(view);
}
// Can happen if fullscreened while unmapped, and hasn't been mapped
if (view->fullscreen_output != NULL) {
view->fullscreen_output->fullscreen_view = NULL;
}
if (view->destroy) {
view->destroy(view);
}