shell32: Don't crash in SHELL_ExecuteW if psei->lpDirectory is NULL.

This commit is contained in:
Jacek Caban 2006-04-14 14:41:31 +02:00 committed by Alexandre Julliard
parent 3492a14641
commit 150bd5442c
1 changed files with 3 additions and 2 deletions

View File

@ -290,8 +290,9 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
startup.cb = sizeof(STARTUPINFOW);
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = psei->nShow;
if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT,
env, *psei->lpDirectory? psei->lpDirectory: NULL, &startup, &info))
if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT, env,
psei->lpDirectory && *psei->lpDirectory ? psei->lpDirectory : NULL,
&startup, &info))
{
/* Give 30 seconds to the app to come up, if desired. Probably only needed
when starting app immediately before making a DDE connection. */