ctl-server: Add null-check for info.seat

pull/268/head
Andri Yngvason 2023-10-14 10:43:08 +00:00
parent 57fb350cfe
commit 27cd6351be
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}