summaryrefslogtreecommitdiffstats
authortcunha <tcunha>2010-10-09 14:31:14 (GMT)
committer Raghavendra D Prabhu <[email protected]>2011-01-02 18:59:30 (GMT)
commit84515de4905dd753a7d14a7292818993b5216b79 (patch) (side-by-side diff)
tree945c47532ea2244161594b7b8e032c5f1e7c7568
parent1e5b695a31e34b76b43272afd3d60e5c00e1dce6 (diff)
downloadtmux-old-84515de4905dd753a7d14a7292818993b5216b79.zip
tmux-old-84515de4905dd753a7d14a7292818993b5216b79.tar.gz
tmux-old-84515de4905dd753a7d14a7292818993b5216b79.tar.bz2
Sync OpenBSD patchset 769:
Skip NULL entries in the sessions list when choosing the next session, from Simon Olofsson.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--server-fn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server-fn.c b/server-fn.c
index 49d6232..fe0484f 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.111 2010/10/09 14:29:32 tcunha Exp $ */
+/* $Id: server-fn.c,v 1.112 2010/10/09 14:31:14 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <[email protected]>
@@ -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, <))