Fix a crash when launching Unix executables.

This commit is contained in:
Rein Klazes 2004-06-04 18:01:02 +00:00 committed by Alexandre Julliard
parent ca46969b13
commit 667ac7ff5e
1 changed files with 2 additions and 1 deletions

View File

@ -1279,7 +1279,8 @@ static char **build_envp( const WCHAR *envW, char *extra_env )
char **envptr = envp;
/* first the extra strings */
for (p = extra_env; *p; p += strlen(p) + 1) *envptr++ = alloc_env_string( "", p );
if (extra_env)
for (p = extra_env; *p; p += strlen(p) + 1) *envptr++ = alloc_env_string( "", p );
/* then put PATH, TEMP, TMP, HOME and WINEPREFIX from the unix env */
if ((p = getenv("PATH"))) *envptr++ = alloc_env_string( "PATH=", p );
if ((p = getenv("TEMP"))) *envptr++ = alloc_env_string( "TEMP=", p );