diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 1ce680943..9b74442d0 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -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; }