Don't crash when running in a context without a home path.

This commit is contained in:
Robin Davies
2024-10-18 05:09:02 -04:00
parent 5ad2d31cc7
commit a5ce1bb265
+3
View File
@@ -150,6 +150,9 @@ std::filesystem::path ResolveHomePath(const std::filesystem::path &path)
{
homeDirectory = getenv("USERPROFILE");
}
if (homeDirectory == nullptr) {
return path;
}
std::filesystem::path result = homeDirectory;
bool first = true;