diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index ca48642d3d14..04dfef42b87c 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: fdesc_vnops.c,v 1.90 2006/03/01 12:38:21 yamt Exp $ */ +/* $NetBSD: fdesc_vnops.c,v 1.91 2006/04/04 14:18:35 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.90 2006/03/01 12:38:21 yamt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.91 2006/04/04 14:18:35 christos Exp $"); #include #include @@ -786,7 +786,7 @@ fdesc_readdir(v) default: KASSERT(fdp != NULL); j = (int)i - 2; - if (fdp->fd_ofiles[j] == NULL || + if (fdp == NULL || fdp->fd_ofiles[j] == NULL || FILE_IS_USABLE(fdp->fd_ofiles[j]) == 0) continue; d.d_fileno = j + FD_STDIN;