diff options
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index 14647b3a..718608ff 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -516,11 +516,11 @@ swayc_t *destroy_view(swayc_t *view) { | |||
516 | return NULL; | 516 | return NULL; |
517 | } | 517 | } |
518 | sway_log(L_DEBUG, "Destroying view '%p'", view); | 518 | sway_log(L_DEBUG, "Destroying view '%p'", view); |
519 | swayc_t *parent = view->parent; | ||
520 | free_swayc(view); | 519 | free_swayc(view); |
521 | 520 | ||
522 | // Destroy empty containers | 521 | // Destroy empty containers |
523 | if (parent->type == C_CONTAINER) { | 522 | swayc_t *parent = view->parent; |
523 | if (parent && parent->type == C_CONTAINER) { | ||
524 | return destroy_container(parent); | 524 | return destroy_container(parent); |
525 | } | 525 | } |
526 | return parent; | 526 | return parent; |