Browse Source

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

Christian Walther 13 years ago
parent
commit
bb98cf94ba
  1. 4
      Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

4
Sources/Plasma/PubUtilLib/plStatusLog/plStatusLog.cpp

@ -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

Loading…
Cancel
Save