Module: wine Branch: refs/heads/master Commit: 150bd5442cf6037f2760e42592190e62ea055edb URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=150bd5442cf6037f2760e425...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Apr 14 14:41:31 2006 +0200
shell32: Don't crash in SHELL_ExecuteW if psei->lpDirectory is NULL.
---
dlls/shell32/shlexec.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 1a30914..ce869ca 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -290,8 +290,9 @@ static UINT_PTR SHELL_ExecuteW(const WCH 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. */