From 2eb6d6e31bdd2270e242d234006e7c83e0d12255 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 15 Oct 2013 00:15:11 +0000 Subject: Fix detach -a by skipping clients where the session is NULL. --- cmd-detach-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd-detach-client.c') diff --git a/cmd-detach-client.c b/cmd-detach-client.c index 82001bee..d40ef5a0 100644 --- a/cmd-detach-client.c +++ b/cmd-detach-client.c @@ -71,7 +71,8 @@ cmd_detach_client_exec(struct cmd *self, struct cmd_q *cmdq) if (args_has(args, 'a')) { for (i = 0; i < ARRAY_LENGTH(&clients); i++) { c2 = ARRAY_ITEM(&clients, i); - if (c2 == NULL || c == c2) + if (c2 == NULL || c2->session == NULL || + c2 == c) continue; server_write_client(c2, msgtype, c2->session->name, -- cgit v1.2.3