mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-22 05:09:13 +00:00
Don’t crash on Linux if environment variable HOME is not set.
This commit is contained in:
@ -97,7 +97,9 @@ plStatusLogMgr::plStatusLogMgr()
|
|||||||
//#elif HS_BUILD_FOR_DARWIN
|
//#elif HS_BUILD_FOR_DARWIN
|
||||||
// Do some Mac specific thing here eventually
|
// Do some Mac specific thing here eventually
|
||||||
#else
|
#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);
|
swprintf(fBasePath, MAX_PATH, L"%S/.cache", temp);
|
||||||
delete[] temp;
|
delete[] temp;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user