aboutsummaryrefslogtreecommitdiff
path: root/sway/ipc-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r--sway/ipc-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index f1854bcc..869f1ed0 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,
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;