diff options
-rw-r--r-- | backends/fs/posix/posix-fs-factory.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp index ae60fbaccb..df21d41dda 100644 --- a/backends/fs/posix/posix-fs-factory.cpp +++ b/backends/fs/posix/posix-fs-factory.cpp @@ -32,8 +32,7 @@ AbstractFSNode *POSIXFilesystemFactory::makeRootFileNode() const { AbstractFSNode *POSIXFilesystemFactory::makeCurrentDirectoryFileNode() const { char buf[MAXPATHLEN]; - getcwd(buf, MAXPATHLEN); - return new POSIXFilesystemNode(buf); + return getcwd(buf, MAXPATHLEN) ? new POSIXFilesystemNode(buf) : NULL; } AbstractFSNode *POSIXFilesystemFactory::makeFileNodePath(const Common::String &path) const { |