kernel32: Avoid setting an empty current directory in the process params.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1a561b640b
commit
7a8ff7fab3
|
@ -1887,8 +1887,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
|
|||
RtlInitUnicodeString( &desktopW, startup->lpDesktop );
|
||||
runtimeW.Buffer = (WCHAR *)startup->lpReserved2;
|
||||
runtimeW.Length = runtimeW.MaximumLength = startup->cbReserved2;
|
||||
if (RtlCreateProcessParametersEx( ¶ms, &imageW, NULL, &curdirW, &cmdlineW, envW, &titleW,
|
||||
&desktopW, NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
|
||||
if (RtlCreateProcessParametersEx( ¶ms, &imageW, NULL, cur_dir ? &curdirW : NULL,
|
||||
&cmdlineW, envW, &titleW, &desktopW,
|
||||
NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
|
||||
{
|
||||
if (envW != env) HeapFree( GetProcessHeap(), 0, envW );
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue