From 592dfb9dd29297f29a4a28154dd5f89df6a52e8c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 14 Jan 2014 14:53:45 +0000 Subject: [PATCH] Tiling2: Fixed buy with deleting last vertical split. --- src/modules/tiling/window_tree.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules/tiling/window_tree.c b/src/modules/tiling/window_tree.c index 62fe285..dc2b2fa 100644 --- a/src/modules/tiling/window_tree.c +++ b/src/modules/tiling/window_tree.c @@ -155,7 +155,14 @@ tiling_window_tree_remove(Window_Tree *root, Window_Tree *item) break; } - if (!item_keep->children) + if (!item_keep) + { + /* Special case of deleting the last vertical split item. */ + free(item); + free(root); + return NULL; + } + else if (!item_keep->children) { parent->client = item_keep->client; parent->children = NULL; -- 2.7.4