1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

(scm_init_load_path): Do not pass NULL to scm_to_locale_string, which

would happen when GUILE_LOAD_PATH is not set.  Thanks to Bill
Schottstaedt.
This commit is contained in:
Marius Vollmer 2004-08-13 12:28:23 +00:00
parent c41acab35c
commit 11c5e0bf6b

View file

@ -204,6 +204,7 @@ SCM_DEFINE (scm_parse_path, "parse-path", 1, 1, 0,
void
scm_init_load_path ()
{
char *env;
SCM path = SCM_EOL;
#ifdef SCM_LIBRARY_DIR
@ -212,8 +213,9 @@ scm_init_load_path ()
scm_makfrom0str (SCM_PKGDATA_DIR));
#endif /* SCM_LIBRARY_DIR */
path = scm_parse_path (scm_from_locale_string (getenv ("GUILE_LOAD_PATH")),
path);
env = getenv ("GUILE_LOAD_PATH");
if (env)
path = scm_parse_path (scm_from_locale_string (env), path);
*scm_loc_load_path = path;
}