mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 14:34:07 +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
@ -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 New Issue
Block a user