diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-04-21 21:32:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-04-21 21:32:01 +0000 |
commit | ff4ecf527c967a24651be238ee6ed47aebdaa394 (patch) | |
tree | 1d144077d4a93596bbd0dcb0df213eb35bca417f /usr.bin/tmux | |
parent | b6cc29495b674a8271dbb09a6805b0779f60ab45 (diff) |
Don't let server_client_check_focus use a dead bufferevent, from Romain
Francoise.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/server-client.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c index 42b73549dc8..4e7bfbc9467 100644 --- a/usr.bin/tmux/server-client.c +++ b/usr.bin/tmux/server-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-client.c,v 1.100 2013/04/10 11:51:16 nicm Exp $ */ +/* $OpenBSD: server-client.c,v 1.101 2013/04/21 21:32:00 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -514,8 +514,10 @@ server_client_loop(void) w->flags &= ~WINDOW_REDRAW; TAILQ_FOREACH(wp, &w->panes, entry) { - server_client_check_focus(wp); - server_client_check_resize(wp); + if (wp->fd != -1) { + server_client_check_focus(wp); + server_client_check_resize(wp); + } wp->flags &= ~PANE_REDRAW; } } @@ -527,7 +529,7 @@ server_client_check_resize(struct window_pane *wp) { struct winsize ws; - if (wp->fd == -1 || !(wp->flags & PANE_RESIZE)) + if (!(wp->flags & PANE_RESIZE)) return; memset(&ws, 0, sizeof ws); |