mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Don't let cmd_lookup_client find clients w/o a session.
This commit is contained in:
parent
9e6d1b24c8
commit
f8f2421ac3
5
cmd.c
5
cmd.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: cmd.c,v 1.123 2009-10-12 00:35:08 tcunha Exp $ */
|
/* $Id: cmd.c,v 1.124 2009-10-14 13:22:24 nicm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -457,7 +457,8 @@ cmd_lookup_client(const char *name)
|
|||||||
u_int i;
|
u_int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_LENGTH(&clients); 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;
|
continue;
|
||||||
path = c->tty.path;
|
path = c->tty.path;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user