summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-09-16 10:44:39 +0200
committerFurkan Sahin <furkan-dev@proton.me>2018-09-16 10:44:39 +0200
commit414c4eb68a387b5d5c7ddba9d811e0bf922e7b3e (patch)
tree1b57c6edfc1a0da28f03088b1290c0e0e9bd9eb0
parent190a0882e7bcc51af474883a424bdbae2d7329f3 (diff)
parent77c70e42934a184289b5c2ce12b2da536de505c4 (diff)
Merge pull request #2638 from RyanDwyer/fix-tab-unmap-crash
Fix crash when unmapping last child of a tabbed workspace
-rw-r--r--sway/tree/container.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index df064573..f906449a 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -202,6 +202,9 @@ static struct sway_container *container_at_tabbed(struct sway_node *parent,
}
struct sway_seat *seat = input_manager_current_seat(input_manager);
list_t *children = node_get_children(parent);
+ if (!children->length) {
+ return NULL;
+ }
// Tab titles
int title_height = container_titlebar_height();