aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_prf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index e8d523e393d8..3794ccf5d930 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -110,7 +110,7 @@ uprintf(const char *fmt, ...)
struct putchar_arg pca;
int retval = 0;
- if (p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
+ if (p && p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
va_start(ap, fmt);
pca.tty = p->p_session->s_ttyp;
pca.flags = TOTTY;