shell32: Fix FindExecutableW() to not check if lpResult after using it. It's supposed to cause a segfault anyway.

Use SE_ERR_FNF rather than a numeric literal.
This commit is contained in:
Francois Gouget 2006-12-13 18:07:42 +01:00 committed by Alexandre Julliard
parent 2538fa319a
commit df9715b1b0
1 changed files with 2 additions and 7 deletions

View File

@ -1013,13 +1013,8 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR
(lpFile != NULL ? debugstr_w(lpFile) : "-"), (lpDirectory != NULL ? debugstr_w(lpDirectory) : "-"));
lpResult[0] = '\0'; /* Start off with an empty return string */
/* trap NULL parameters on entry */
if ((lpFile == NULL) || (lpResult == NULL))
{
/* FIXME - should throw a warning, perhaps! */
return (HINSTANCE)2; /* File not found. Close enough, I guess. */
}
if (lpFile == NULL)
return (HINSTANCE)SE_ERR_FNF;
if (lpDirectory)
{