If HOME environment variable is not configured, use / as home. Having NULL home_path will crash freerdp.

This commit is contained in:
Pawel Jakub Dawidek 2012-02-17 17:38:02 +01:00 committed by Anthony Tong
parent 8139fdb392
commit 0a12057b1c

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