mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Do not include unattached clients on sorted list, fixes crash reported
by Marcel Partap.
This commit is contained in:
4
sort.c
4
sort.c
@@ -425,6 +425,10 @@ sort_get_clients(u_int *n, struct sort_criteria *sort_crit)
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
TAILQ_FOREACH(c, &clients, entry) {
|
TAILQ_FOREACH(c, &clients, entry) {
|
||||||
|
if (c->flags & CLIENT_UNATTACHEDFLAGS)
|
||||||
|
continue;
|
||||||
|
if (~c->flags & CLIENT_ATTACHED)
|
||||||
|
continue;
|
||||||
if (lsz <= i) {
|
if (lsz <= i) {
|
||||||
lsz += 100;
|
lsz += 100;
|
||||||
l = xreallocarray(l, lsz, sizeof *l);
|
l = xreallocarray(l, lsz, sizeof *l);
|
||||||
|
|||||||
Reference in New Issue
Block a user