cmd_split: add null checks in do_split

Fixes a crash when running `split` commands with the workspace focused.
This commit is contained in:
Brian Ashworth 2018-12-17 12:16:19 -05:00 committed by emersion
parent 5f25541022
commit 4e2cfe0526

View file

@ -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);
}