summaryrefslogtreecommitdiff
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index e494d1b2a2d7..664b02fc06c6 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1663,7 +1663,7 @@ ttymodem(struct tty *tp, int flag)
CLR(tp->t_state, TS_CONNECTED);
if (tp->t_session) {
sx_slock(&proctree_lock);
- if (tp->t_session->s_leader) {
+ if (tp->t_session && tp->t_session->s_leader) {
struct proc *p;
p = tp->t_session->s_leader;