mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Don't access a NULL path
This can happen if the Uemis is not correctly connected, but the user still has the path set (as default DC most likely) and tries to start a download. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e4ea41b7bc
commit
7ba5566073
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ static int number_of_file(char *path)
|
|||
struct dirent * entry;
|
||||
|
||||
dirp = opendir(path);
|
||||
while ((entry = readdir(dirp)) != NULL) {
|
||||
while (dirp && (entry = readdir(dirp)) != NULL) {
|
||||
#ifndef WIN32
|
||||
if (entry->d_type == DT_REG) /* If the entry is a regular file */
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue