aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/posix
diff options
context:
space:
mode:
authorJames Brown2002-12-27 00:13:51 +0000
committerJames Brown2002-12-27 00:13:51 +0000
commit18b97b28a50f4595a73dd03431039606707baa55 (patch)
tree06fe282bb266016070a451fc914b42eb26abce9c /backends/fs/posix
parentfd64fc2b6ba7fd18c568d60bd27cb113f428833e (diff)
downloadscummvm-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/fs/posix')
-rw-r--r--backends/fs/posix/posix-fs.cpp3
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) {