deref decoration::view
although the targeted situation should (according to the protocol) never occur, there is something that triggers it from time to time (maybe wlroots?)
This commit is contained in:
parent
3a0cf2ceb5
commit
e67f6c0113
1 changed files with 7 additions and 1 deletions
|
@ -239,6 +239,10 @@ xdg_surface_destroy_notify(struct wl_listener *listener, void *UNUSED(data))
|
||||||
view_child_destroy(child);
|
view_child_destroy(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (view->decoration) {
|
||||||
|
view->decoration->view = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_remove(&view->link);
|
wl_list_remove(&view->link);
|
||||||
wl_list_remove(&view->children);
|
wl_list_remove(&view->children);
|
||||||
wl_list_remove(&view->map.link);
|
wl_list_remove(&view->map.link);
|
||||||
|
@ -511,7 +515,9 @@ xdg_decoration_destroy_notify(struct wl_listener *listener, void *UNUSED(data))
|
||||||
struct kiwmi_xdg_decoration *decoration =
|
struct kiwmi_xdg_decoration *decoration =
|
||||||
wl_container_of(listener, decoration, destroy);
|
wl_container_of(listener, decoration, destroy);
|
||||||
|
|
||||||
decoration->view->decoration = NULL;
|
if (decoration->view) {
|
||||||
|
decoration->view->decoration = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
wl_list_remove(&decoration->destroy.link);
|
wl_list_remove(&decoration->destroy.link);
|
||||||
wl_list_remove(&decoration->request_mode.link);
|
wl_list_remove(&decoration->request_mode.link);
|
||||||
|
|
Loading…
Add table
Reference in a new issue