aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/split.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-17 12:16:19 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-17 18:23:32 +0100
commit4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c (patch)
tree8aa0633c633fb4bdcee89da434ea87231899020e /sway/commands/split.c
parentAllow output ids and wildcard for workspace output (diff)
downloadsway-4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c.tar.gz
sway-4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c.tar.zst
sway-4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c.zip
cmd_split: add null checks in do_split
Fixes a crash when running `split` commands with the workspace focused.
Diffstat (limited to 'sway/commands/split.c')
-rw-r--r--sway/commands/split.c2
1 files changed, 1 insertions, 1 deletions
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) {
18 workspace_split(ws, layout); 18 workspace_split(ws, layout);
19 } 19 }
20 20
21 if (con->parent->parent) { 21 if (con && con->parent && con->parent->parent) {
22 container_flatten(con->parent->parent); 22 container_flatten(con->parent->parent);
23 } 23 }
24 24