diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-14 09:29:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-10-14 09:29:11 +0000 |
commit | 8c47039dd0398cab14e93383e198d14b3782e0a0 (patch) | |
tree | e0b89f7cd2a978e2aa820238c95c107fb2221873 /usr.bin | |
parent | c3704d0b0343a02a99cb63757f9c34d82c8e5005 (diff) |
Don't allow cmd_lookup_client to test clients without a session.
Diffstat (limited to 'usr.bin')
-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; |