mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 17:31:28 +00:00
Fix use-after free introduced by cbe7364
This commit is contained in:
parent
6271abd644
commit
a82aa2a20d
|
@ -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