diff options
author | James Brown | 2002-12-27 00:13:51 +0000 |
---|---|---|
committer | James Brown | 2002-12-27 00:13:51 +0000 |
commit | 18b97b28a50f4595a73dd03431039606707baa55 (patch) | |
tree | 06fe282bb266016070a451fc914b42eb26abce9c /backends | |
parent | fd64fc2b6ba7fd18c568d60bd27cb113f428833e (diff) | |
download | scummvm-rg350-18b97b28a50f4595a73dd03431039606707baa55.tar.gz scummvm-rg350-18b97b28a50f4595a73dd03431039606707baa55.tar.bz2 scummvm-rg350-18b97b28a50f4595a73dd03431039606707baa55.zip |
Patch from ccr: Don't segfault if euid has no r/w perms on pwd
svn-id: r6183
Diffstat (limited to 'backends')
-rw-r--r-- | backends/fs/posix/posix-fs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index d74bfdca57..23ad5786fe 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -95,10 +95,11 @@ FSList *POSIXFilesystemNode::listDir(ListMode mode) const { assert(_isDirectory); DIR *dirp = opendir(_path.c_str()); struct stat st; - assert(dirp != 0); struct dirent *dp; FSList *myList = new FSList(); + + if (dirp == NULL) return myList; // ... loop over dir entries using readdir while ((dp = readdir(dirp)) != NULL) { |