X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/01633a17e74e638f31ec71c3587481f0084574f2..db50ad5f11cc5809c27091181a13ee7aa34ec5ed:/src/emacs.c diff --git a/src/emacs.c b/src/emacs.c index 9c5a33d5a8..2dfd12eff8 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2224,7 +2224,8 @@ decode_env_path (const char *evarname, const char *defalt, bool empty) /* egetenv looks in process-environment, which holds the variables in their original system-locale encoding. We need emacs_dir to be in UTF-8. */ - filename_from_ansi (edir, emacs_dir); + if (edir) + filename_from_ansi (edir, emacs_dir); #endif /* It's okay to use getenv here, because this function is only used @@ -2299,7 +2300,7 @@ decode_env_path (const char *evarname, const char *defalt, bool empty) #ifdef WINDOWSNT /* Relative file names in the default path are interpreted as being relative to $emacs_dir. */ - if (emacs_dir && defaulted + if (edir && defaulted && strncmp (path, emacs_dir_env, emacs_dir_len) == 0) element = Fexpand_file_name (Fsubstring (element,