From 5dc9a8a99e38a22c3c690d143e32901eeef7b9ab Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 20 Jan 2012 04:07:45 +0300 Subject: Fix possible crash with incorrect dirs. --- src/utils/paths.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3-70-g09d2