_pinfo::set_ctty: Check potential NULL pointer in debug_printf statement

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-11-24 15:06:51 +01:00
parent 1dfffe8ef4
commit 59ab07f170
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ _pinfo::set_ctty (fhandler_termios *fh, int flags)
if (!tc.getpgid () && pgid == pid)
tc.setpgid (pgid);
}
debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh->archetype);
debug_printf ("cygheap->ctty now %p, archetype %p", cygheap->ctty, fh ? fh->archetype : NULL);
return ctty > 0;
}