mirror of
https://github.com/swaywm/sway.git
synced 2024-11-01 05:57:17 +00:00
Fix use-after free introduced by cbe7364
This commit is contained in:
parent
6271abd644
commit
ec73c19121
|
@ -516,10 +516,10 @@ swayc_t *destroy_view(swayc_t *view) {
|
|||
return NULL;
|
||||
}
|
||||
sway_log(L_DEBUG, "Destroying view '%p'", view);
|
||||
swayc_t *parent = view->parent;
|
||||
free_swayc(view);
|
||||
|
||||
// Destroy empty containers
|
||||
swayc_t *parent = view->parent;
|
||||
if (parent && parent->type == C_CONTAINER) {
|
||||
return destroy_container(parent);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue