diff options
Diffstat (limited to 'SwifTools/Application')
-rw-r--r-- | SwifTools/Application/UnixApplicationPathProvider.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/SwifTools/Application/UnixApplicationPathProvider.cpp b/SwifTools/Application/UnixApplicationPathProvider.cpp index c5a2782..06fa977 100644 --- a/SwifTools/Application/UnixApplicationPathProvider.cpp +++ b/SwifTools/Application/UnixApplicationPathProvider.cpp @@ -25,7 +25,8 @@ UnixApplicationPathProvider::UnixApplicationPathProvider(const String& name) : A } boost::filesystem::path UnixApplicationPathProvider::getHomeDir() const { - return boost::filesystem::path(getenv("HOME")); + char* home = getenv("HOME"); + return home ? boost::filesystem::path(home) : boost::filesystem::path(); } boost::filesystem::path UnixApplicationPathProvider::getDataDir() const { |