diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-05 17:15:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-10-05 17:15:22 +0000 |
commit | ff8add3190a59854c40d4cb7851d88c473334a79 (patch) | |
tree | f21dedd0ff195bfd4d630c387fcd7b1eab7af172 /usr.bin/tmux | |
parent | 630b2b1a8d6b0c6eb000c01b8e0a8d73aa1c3d28 (diff) |
Skip NULL entries in the sessions list when choosing the next session,
from Simon Olofsson.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index a69ff8d9d67..c7253dc09d3 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.42 2010/09/26 20:43:30 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.43 2010/10/05 17:15:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -368,7 +368,7 @@ server_next_session(struct session *s) s_out = NULL; for (i = 0; i < ARRAY_LENGTH(&sessions); i++) { s_loop = ARRAY_ITEM(&sessions, i); - if (s_loop == s) + if (s_loop == NULL || s_loop == s) continue; if (s_out == NULL || timercmp(&s_loop->activity_time, &s_out->activity_time, <)) |