mirror of
https://github.com/swaywm/sway.git
synced 2025-11-10 13:29:51 -05:00
Fix segfaults when focusing a workspace
This commit is contained in:
parent
03255fd202
commit
eb716c6c43
2 changed files with 21 additions and 10 deletions
|
|
@ -390,7 +390,7 @@ static void ipc_get_workspaces_callback(struct sway_container *workspace,
|
|||
struct sway_seat *seat =
|
||||
sway_input_manager_get_default_seat(input_manager);
|
||||
struct sway_container *focused_ws = sway_seat_get_focus(seat);
|
||||
if (focused_ws->type != C_WORKSPACE) {
|
||||
if (focused_ws != NULL && focused_ws->type != C_WORKSPACE) {
|
||||
focused_ws = container_parent(focused_ws, C_WORKSPACE);
|
||||
}
|
||||
bool focused = workspace == focused_ws;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue