about summary refs log tree commit diff stats
path: root/src/tools/fileutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/fileutils.c')
-rwxr-xr-xsrc/tools/fileutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/fileutils.c b/src/tools/fileutils.c
index 870bbd1b..18b8dc4d 100755
--- a/src/tools/fileutils.c
+++ b/src/tools/fileutils.c
@@ -46,7 +46,7 @@ char* ResolveFile(const char* filename, path_collection_t* paths)
     for (int i=0; i<paths->size; ++i) {
         if(paths->paths[i][0]!='/') {
             // not an absolute path...
-            getcwd(p, sizeof(p));
+            if(!getcwd(p, sizeof(p))) return NULL;
             if(p[strlen(p)-1]!='/')
                 strcat(p, "/");
             strcat(p, paths->paths[i]);