summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/paths.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp
index 2ef5bb6ae..8decb6e95 100644
--- a/src/utils/paths.cpp
+++ b/src/utils/paths.cpp
@@ -43,6 +43,8 @@ std::string getRealPath(const std::string &str)
#else
char *realPath = realpath(str.c_str(), nullptr);
#endif
+ if (!realPath)
+ return "";
path = realPath;
free(realPath);
return path;