check pw and pw_dir to be not null so that if either are null it bails to else block

pull/1306/head
Jeff Becker 4 years ago
parent 2371e416bd
commit 63b56d55a9
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -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…
Cancel
Save