summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-01-18 20:10:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-01-18 20:27:37 (GMT)
commit0d3d7579032959203c5c52f5ced9de5494c7b0bf (patch)
tree1e166cbae3dac23e8f815bc32f856b6c0a666fbd /SwifTools/Application
parentc2580661a20e30abaa23c61808d6370a575665c1 (diff)
downloadswift-0d3d7579032959203c5c52f5ced9de5494c7b0bf.zip
swift-0d3d7579032959203c5c52f5ced9de5494c7b0bf.tar.bz2
Cleaned up some code.
Diffstat (limited to 'SwifTools/Application')
-rw-r--r--SwifTools/Application/UnixApplicationPathProvider.cpp3
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 {