mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 12:33:50 +01: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 New Issue
Block a user