mirror of
https://github.com/swaywm/sway.git
synced 2024-12-29 00:16:22 +01:00
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
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ static struct cmd_results *do_split(int layout) {
|
||||||
workspace_split(ws, layout);
|
workspace_split(ws, layout);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (con->parent->parent) {
|
if (con && con->parent && con->parent->parent) {
|
||||||
container_flatten(con->parent->parent);
|
container_flatten(con->parent->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue