Commit 077b53f1 authored by Rafaël Carré's avatar Rafaël Carré

config_Get*Dir() : don't call FromLocaleDup(NULL)

parent b50c8e84
...@@ -82,6 +82,9 @@ static char *config_GetHomeDir (void) ...@@ -82,6 +82,9 @@ static char *config_GetHomeDir (void)
} }
#endif #endif
if (!home)
return NULL
return FromLocaleDup (home); return FromLocaleDup (home);
} }
...@@ -204,7 +207,7 @@ static char *config_GetTypeDir (const char *xdg_name) ...@@ -204,7 +207,7 @@ static char *config_GetTypeDir (const char *xdg_name)
if (strcmp (xdg_name, "DESKTOP") == 0) if (strcmp (xdg_name, "DESKTOP") == 0)
{ {
if (asprintf (&path, "%s/Desktop", home) == -1) if (asprintf (&path, "%s/Desktop", home) == -1)
path = NULL; return NULL;
} }
else else
path = strdup (home); path = strdup (home);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment