mirror of https://github.com/oxen-io/lokinet
check pw and pw_dir to be not null so that if either are null it bails to else block
This commit is contained in:
parent
2371e416bd
commit
63b56d55a9
|
@ -26,7 +26,7 @@ namespace llarp
|
|||
fs::path homedir;
|
||||
|
||||
auto pw = getpwuid(getuid());
|
||||
if (pw)
|
||||
if (pw and pw->pw_dir)
|
||||
{
|
||||
homedir = pw->pw_dir;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue