Commit 6d169747 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Correct return value in a couple of error cases.

parent 347081d5
......@@ -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)
......
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