Fix two segfaults when destroying outputs

This commit is contained in:
emersion 2018-03-31 13:47:22 -04:00
parent 59f362196b
commit 8aedc042ee
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 4 additions and 3 deletions

View file

@ -107,7 +107,7 @@ struct sway_container *container_reap_empty(struct sway_container *container) {
return NULL;
}
wlr_log(L_DEBUG, "reaping %p %s", container, container->name);
while (container->children->length == 0) {
while (container != &root_container && container->children->length == 0) {
if (container->type == C_WORKSPACE) {
if (!workspace_is_visible(container)) {
struct sway_container *parent = container->parent;