summaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 95a84d12..b0ce4aaf 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -110,7 +110,7 @@ struct sway_container *container_reap_empty(struct sway_container *container) {
wlr_log(L_DEBUG, "Reaping %p %s '%s'", container,
container_type_to_str(container->type), container->name);
while (container->type != C_ROOT && container->type != C_OUTPUT
- && container->children->length == 0) {
+ && container->children && container->children->length == 0) {
if (container->type == C_WORKSPACE) {
if (!workspace_is_visible(container)) {
struct sway_container *parent = container->parent;