diff options
Diffstat (limited to 'compat/mingw.c')
-rw-r--r-- | compat/mingw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 29f403649f..9f8f37f062 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1582,7 +1582,7 @@ struct dirent *mingw_readdir(DIR *dir) HANDLE handle; struct mingw_DIR *mdir = (struct mingw_DIR*)dir; - if (!dir->dd_handle) { + if (!dir || !dir->dd_handle) { errno = EBADF; /* No set_errno for mingw */ return NULL; } |