aboutsummaryrefslogtreecommitdiff
path: root/cmd-find.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-04-28 09:10:51 +0100
committerThomas Adam <thomas@xteddy.org>2015-04-28 09:10:51 +0100
commit7d98c51805b6d1c6996b4bc6a68107d4e6bb0038 (patch)
tree6d21694573c5bf78ef9e1cbe92960852e83b0f99 /cmd-find.c
parent94a8ef1caef855d1a43b6373dd08ce0bbf4aadd5 (diff)
parentc2bc84aa4dd30c46930994321de0541edf6a30e9 (diff)
downloadrtmux-7d98c51805b6d1c6996b4bc6a68107d4e6bb0038.tar.gz
rtmux-7d98c51805b6d1c6996b4bc6a68107d4e6bb0038.tar.bz2
rtmux-7d98c51805b6d1c6996b4bc6a68107d4e6bb0038.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-find.c')
-rw-r--r--cmd-find.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd-find.c b/cmd-find.c
index a71968a1..f7c1ba74 100644
--- a/cmd-find.c
+++ b/cmd-find.c
@@ -125,13 +125,17 @@ cmd_find_best_client(struct client **clist, u_int csize)
c = NULL;
if (clist != NULL) {
for (i = 0; i < csize; i++) {
+ if (clist[i]->session == NULL)
+ continue;
if (cmd_find_client_better(clist[i], c))
c = clist[i];
}
} else {
TAILQ_FOREACH(c_loop, &clients, entry) {
+ if (c_loop->session == NULL)
+ continue;
if (cmd_find_client_better(c_loop, c))
- c_loop = c;
+ c = c_loop;
}
}
return (c);