diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-31 19:45:30 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-03-31 19:45:30 -0400 |
commit | 27e394f8b07fed21f791f2a06b93c3bfc0f991b7 (patch) | |
tree | f8481fce37ae971c0f3cb30f6d1b7033c99b097e | |
parent | fix some segfaults (diff) | |
download | sway-27e394f8b07fed21f791f2a06b93c3bfc0f991b7.tar.gz sway-27e394f8b07fed21f791f2a06b93c3bfc0f991b7.tar.zst sway-27e394f8b07fed21f791f2a06b93c3bfc0f991b7.zip |
fix children list segfault
-rw-r--r-- | sway/tree/container.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index b3c6d80f..f4c82abe 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -71,8 +71,8 @@ static struct sway_container *_container_destroy(struct sway_container *cont) { | |||
71 | // container_remove_child, which removes child from this container | 71 | // container_remove_child, which removes child from this container |
72 | while (cont->children != NULL && cont->children->length != 0) { | 72 | while (cont->children != NULL && cont->children->length != 0) { |
73 | struct sway_container *child = cont->children->items[0]; | 73 | struct sway_container *child = cont->children->items[0]; |
74 | container_remove_child(child); | ||
75 | container_destroy(child); | 74 | container_destroy(child); |
75 | list_del(cont->children, 0); | ||
76 | } | 76 | } |
77 | } | 77 | } |
78 | if (cont->marks) { | 78 | if (cont->marks) { |