Merge pull request #439 from pjd/fixes
Fix crash when HOME is not defined and remove redundant code.
This commit is contained in:
commit
8293c5b4cb
@ -82,6 +82,8 @@ char* freerdp_get_home_path(rdpSettings* settings)
|
||||
{
|
||||
if (settings->home_path == NULL)
|
||||
settings->home_path = getenv(HOME_ENV_VARIABLE);
|
||||
if (settings->home_path == NULL)
|
||||
settings->home_path = xstrdup("/");
|
||||
|
||||
return settings->home_path;
|
||||
}
|
||||
|
@ -140,13 +140,6 @@ void registry_init(rdpRegistry* registry)
|
||||
|
||||
registry->available = true;
|
||||
|
||||
if (home_path == NULL)
|
||||
{
|
||||
printf("could not get home path\n");
|
||||
registry->available = false;
|
||||
return;
|
||||
}
|
||||
|
||||
registry->home = (char*) xstrdup(home_path);
|
||||
printf("home path: %s\n", registry->home);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user