Commit 150bd544 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 3492a146
...@@ -290,8 +290,9 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait, ...@@ -290,8 +290,9 @@ static UINT_PTR SHELL_ExecuteW(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
startup.cb = sizeof(STARTUPINFOW); startup.cb = sizeof(STARTUPINFOW);
startup.dwFlags = STARTF_USESHOWWINDOW; startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = psei->nShow; startup.wShowWindow = psei->nShow;
if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT, if (CreateProcessW(NULL, (LPWSTR)lpCmd, NULL, NULL, FALSE, CREATE_UNICODE_ENVIRONMENT, env,
env, *psei->lpDirectory? psei->lpDirectory: NULL, &startup, &info)) psei->lpDirectory && *psei->lpDirectory ? psei->lpDirectory : NULL,
&startup, &info))
{ {
/* Give 30 seconds to the app to come up, if desired. Probably only needed /* Give 30 seconds to the app to come up, if desired. Probably only needed
when starting app immediately before making a DDE connection. */ when starting app immediately before making a DDE connection. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment