Merge pull request #439 from pjd/fixes

Fix crash when HOME is not defined and remove redundant code.
This commit is contained in:
Marc-André Moreau 2012-02-17 08:43:45 -08:00
commit 8293c5b4cb
2 changed files with 2 additions and 7 deletions

View File

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

View File

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