cmd_split: add null checks in do_split
Fixes a crash when running `split` commands with the workspace focused.
This commit is contained in:
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…
Reference in a new issue