diff options
author | emersion <contact@emersion.fr> | 2018-03-30 16:12:02 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-30 16:12:02 -0400 |
commit | eb716c6c43ab3c9f265c2629538e232c4b3de625 (patch) | |
tree | c73b086cbc468ad3449f364d2a14d9acc68d1f39 /sway/ipc-server.c | |
parent | Fix pointer events for hidden workspaces (diff) | |
download | sway-eb716c6c43ab3c9f265c2629538e232c4b3de625.tar.gz sway-eb716c6c43ab3c9f265c2629538e232c4b3de625.tar.zst sway-eb716c6c43ab3c9f265c2629538e232c4b3de625.zip |
Fix segfaults when focusing a workspace
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r-- | sway/ipc-server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 394161af..6f7a0670 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c | |||
@@ -390,7 +390,7 @@ static void ipc_get_workspaces_callback(struct sway_container *workspace, | |||
390 | struct sway_seat *seat = | 390 | struct sway_seat *seat = |
391 | sway_input_manager_get_default_seat(input_manager); | 391 | sway_input_manager_get_default_seat(input_manager); |
392 | struct sway_container *focused_ws = sway_seat_get_focus(seat); | 392 | struct sway_container *focused_ws = sway_seat_get_focus(seat); |
393 | if (focused_ws->type != C_WORKSPACE) { | 393 | if (focused_ws != NULL && focused_ws->type != C_WORKSPACE) { |
394 | focused_ws = container_parent(focused_ws, C_WORKSPACE); | 394 | focused_ws = container_parent(focused_ws, C_WORKSPACE); |
395 | } | 395 | } |
396 | bool focused = workspace == focused_ws; | 396 | bool focused = workspace == focused_ws; |