view: fix surface_new_subsurface use-after-free

This commit is contained in:
Ronan Pigott 2020-06-12 15:28:47 -07:00 committed by Simon Ser
parent c22caa54a8
commit 90d936d4ad

View file

@ -949,6 +949,7 @@ void view_child_destroy(struct sway_view_child *child) {
wl_list_remove(&child->surface_commit.link); wl_list_remove(&child->surface_commit.link);
wl_list_remove(&child->surface_destroy.link); wl_list_remove(&child->surface_destroy.link);
wl_list_remove(&child->view_unmap.link); wl_list_remove(&child->view_unmap.link);
wl_list_remove(&child->surface_new_subsurface.link);
if (child->impl && child->impl->destroy) { if (child->impl && child->impl->destroy) {
child->impl->destroy(child); child->impl->destroy(child);