aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2018-12-17 12:16:19 -0500
committeremersion <contact@emersion.fr>2018-12-17 18:23:32 +0100
commit4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c (patch)
tree8aa0633c633fb4bdcee89da434ea87231899020e /sway/commands
parent5f25541022fb19a170360536985a0b200a01277a (diff)
downloadsway-4e2cfe0526e1278abc9c7370e62a4dbdc4a9c63c.tar.xz
cmd_split: add null checks in do_split
Fixes a crash when running `split` commands with the workspace focused.
Diffstat (limited to 'sway/commands')
-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) {
workspace_split(ws, layout);
}
- if (con->parent->parent) {
+ if (con && con->parent && con->parent->parent) {
container_flatten(con->parent->parent);
}