aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 70470a08..a9678eaf 100644
--- a/tty.c
+++ b/tty.c
@@ -302,7 +302,7 @@ tty_start_tty(struct tty *tty)
{
struct client *c = tty->client;
struct termios tio;
- struct timeval tv = { .tv_sec = 1 };
+ struct timeval tv = { .tv_sec = 3 };
setblocking(c->fd, 0);
event_add(&tty->event_in, NULL);
@@ -937,7 +937,9 @@ tty_update_window_offset(struct window *w)
struct client *c;
TAILQ_FOREACH(c, &clients, entry) {
- if (c->session != NULL && c->session->curw->window == w)
+ if (c->session != NULL &&
+ c->session->curw != NULL &&
+ c->session->curw->window == w)
tty_update_client_offset(c);
}
}