2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Don’t crash on Linux if environment variable HOME is not set.

This commit is contained in:
Christian Walther
2011-11-26 20:57:00 +01:00
parent 8ec36007c1
commit bb98cf94ba

View File

@ -97,7 +97,9 @@ plStatusLogMgr::plStatusLogMgr()
//#elif HS_BUILD_FOR_DARWIN
// Do some Mac specific thing here eventually
#else
wchar* temp = hsStringToWString(getenv("HOME"));
const char* home = getenv("HOME");
if (!home) home = "";
wchar* temp = hsStringToWString(home);
swprintf(fBasePath, MAX_PATH, L"%S/.cache", temp);
delete[] temp;
#endif