diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-09 15:56:53 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-09 15:56:53 +0900 |
commit | 7ba55660732192666f0d846906b4e8171a90fee8 (patch) | |
tree | 3f0586c034fa9c2ac69f1a3f138da15c393c667f /uemis-downloader.c | |
parent | e4ea41b7bc63a357822083642319e7e34cc12d4d (diff) | |
download | subsurface-7ba55660732192666f0d846906b4e8171a90fee8.tar.gz |
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>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index b0cb5f1a7..e8e24b78e 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -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 |