cmd_split: add null checks in do_split

Fixes a crash when running `split` commands with the workspace focused.
master
Brian Ashworth 6 years ago committed by emersion
parent 5f25541022
commit 4e2cfe0526

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

Loading…
Cancel
Save