Correct return value in a couple of error cases.

This commit is contained in:
Juan Lang 2004-04-15 05:04:10 +00:00 committed by Alexandre Julliard
parent 347081d532
commit 6d169747d6
1 changed files with 4 additions and 1 deletions

View File

@ -1621,6 +1621,9 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
HANDLE hFile;
WIN32_FIND_DATAA stffile;
if (!ppidl)
return E_INVALIDARG;
hFile = FindFirstFileA(szPath, &stffile);
if (hFile == INVALID_HANDLE_VALUE)
@ -1630,7 +1633,7 @@ HRESULT _ILCreateFromPathA(LPCSTR szPath, LPITEMIDLIST* ppidl)
*ppidl = _ILCreateFromFindDataA(&stffile);
return S_OK;
return *ppidl ? S_OK : E_OUTOFMEMORY;
}
LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)