aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-03-14 17:07:07 +0000
committerMax Horn2009-03-14 17:07:07 +0000
commitc7df3e2f7aa94161c61bebfcdf5156757f34f3ce (patch)
treec895283ae32c11df7e90187bd3e71afe0c03eebc
parent6398e56d09976b21cca7f071e06caf51c7487615 (diff)
downloadscummvm-rg350-c7df3e2f7aa94161c61bebfcdf5156757f34f3ce.tar.gz
scummvm-rg350-c7df3e2f7aa94161c61bebfcdf5156757f34f3ce.tar.bz2
scummvm-rg350-c7df3e2f7aa94161c61bebfcdf5156757f34f3ce.zip
Applied part of patch #2684986
svn-id: r39398
-rw-r--r--backends/fs/posix/posix-fs-factory.cpp3
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 {