Skip to content

Commit

Permalink
ctl-server: Add null-check for info.seat
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Oct 14, 2023
1 parent 57fb350 commit 27cd635
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ctl-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ static struct cmd_response* generate_vnc_client_list(struct ctl* self)
json_object_set_new(packed, "username",
json_string(info.username));

json_object_set_new(packed, "seat", json_string(info.seat));
if (info.seat)
json_object_set_new(packed, "seat",
json_string(info.seat));

json_array_append_new(response->data, packed);
}

Expand Down

0 comments on commit 27cd635

Please sign in to comment.