From 4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Mon, 17 Dec 2018 12:16:19 -0500 Subject: cmd_split: add null checks in do_split Fixes a crash when running `split` commands with the workspace focused. --- sway/commands/split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/commands/split.c') diff --git a/sway/commands/split.c b/sway/commands/split.c index 85a53a55..84385fa9 100644 --- a/sway/commands/split.c +++ b/sway/commands/split.c @@ -18,7 +18,7 @@ static struct cmd_results *do_split(int layout) { workspace_split(ws, layout); } - if (con->parent->parent) { + if (con && con->parent && con->parent->parent) { container_flatten(con->parent->parent); } -- cgit v1.2.3-70-g09d2