diff options
-rw-r--r-- | usr.bin/tmux/cmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index e2d290840b7..6bb4e9fe94f 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.24 2009/10/11 10:04:27 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.25 2009/10/14 09:29:10 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -458,7 +458,8 @@ cmd_lookup_client(const char *name) u_int i; for (i = 0; i < ARRAY_LENGTH(&clients); i++) { - if ((c = ARRAY_ITEM(&clients, i)) == NULL) + c = ARRAY_ITEM(&clients, i); + if (c == NULL || c->session == NULL) continue; path = c->tty.path; |