mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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;
|
struct dirent * entry;
|
||||||
|
|
||||||
dirp = opendir(path);
|
dirp = opendir(path);
|
||||||
while ((entry = readdir(dirp)) != NULL) {
|
while (dirp && (entry = readdir(dirp)) != NULL) {
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
if (entry->d_type == DT_REG) /* If the entry is a regular file */
|
if (entry->d_type == DT_REG) /* If the entry is a regular file */
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue