diff --git a/sway/container.c b/sway/container.c index 718608ff..829fde69 100644 --- a/sway/container.c +++ b/sway/container.c @@ -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); }