diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 22:40:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-11-21 22:40:55 +0000 |
commit | e2438dc96e33ba8741090398344103fd2533fe2a (patch) | |
tree | abbc2135fbc8c05cdf8571ecec690cc993753a3f /server-msg.c | |
parent | 39dfa41971533506216b135dce0afcccf5a60ee8 (diff) |
Check for NULL clients.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server-msg.c b/server-msg.c index 35eafe01..dc0cefc7 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.35 2007-11-21 20:04:37 nicm Exp $ */ +/* $Id: server-msg.c,v 1.36 2007-11-21 22:40:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -152,7 +152,7 @@ server_msg_fn_command(struct hdr *hdr, struct client *c) for (i = 0; i < ARRAY_LENGTH(&clients); i++) { /* XXX fnmatch, multi clients etc */ c = ARRAY_ITEM(&clients, i); - if (strcmp(client, c->tty) == 0) + if (c != NULL && strcmp(client, c->tty) == 0) ctx.client = c; } if (ctx.client == NULL) { |