From 2438f5f0503f285f1753b03e28532ad39c89b08a Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 29 Aug 2018 10:49:44 +1000 Subject: Fix crash when reaping a workspace It wasn't returning the surviving container. --- sway/tree/container.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway/tree/container.c') diff --git a/sway/tree/container.c b/sway/tree/container.c index ee019098..520b4566 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -173,6 +173,9 @@ struct sway_container *container_reap_empty(struct sway_container *con) { } if (con && con->type == C_WORKSPACE) { workspace_consider_destroy(con); + if (con->destroying) { + con = con->parent; + } } return con; } -- cgit v1.2.3-54-g00ecf