Make sure we have a non-null proc pointer before referring to fields

off of it.
This commit is contained in:
Matt Jacob 2000-12-23 07:33:32 +00:00
parent f4084c4526
commit 661f2768f4

View File

@ -139,7 +139,7 @@ tprintf(struct proc *p, int pri, const char *fmt, ...)
if (pri != -1)
flags |= TOLOG;
if (p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
if (p && p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
SESSHOLD(p->p_session);
shld++;
if (ttycheckoutq(p->p_session->s_ttyp, 0)) {