diff options
author | Drew DeVault <[email protected]> | 2017-10-08 10:57:41 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2017-10-08 10:57:41 -0400 |
commit | 5ecedc7199fcd9788ae2d96f0ed1f25a2cbe7364 (patch) | |
tree | 61433d41f28947a576dc079e275df356bb831d2e /sway/container.c | |
parent | 46e5aeac5016f336aa1184b2752146c04ece21d9 (diff) |
Remove destroyed views from scratchpad
Fixes #1363
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) { return NULL; } sway_log(L_DEBUG, "Destroying view '%p'", view); - swayc_t *parent = view->parent; free_swayc(view); // Destroy empty containers - if (parent->type == C_CONTAINER) { + swayc_t *parent = view->parent; + if (parent && parent->type == C_CONTAINER) { return destroy_container(parent); } return parent; |