Commit a9c88905 authored by Gerard Patel's avatar Gerard Patel Committed by Alexandre Julliard

Handle empty strings and invalid values in lpstrInitialDir for 32 bits

open file dialogs.
parent c2c004de
......@@ -2693,7 +2693,7 @@ LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
* GetPidlFromName
*
* returns the pidl of the file name relative to folder
* NULL if an error occured
* NULL if an error occurred
*/
LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName)
{
......@@ -2704,7 +2704,8 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPCSTR lpcstrFileName)
TRACE("sf=%p file=%s\n", lpsf, lpcstrFileName);
if(!lpcstrFileName) return NULL;
if(!*lpcstrFileName) return NULL;
MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,lpcstrFileName,-1,(LPWSTR)lpwstrDirName,MAX_PATH);
if(!lpsf)
......
......@@ -682,7 +682,10 @@ static HRESULT WINAPI IShellFolder_fnParseDisplayName(
}
}
*ppidl = pidlTemp;
if (!hr)
*ppidl = pidlTemp;
else
*ppidl = NULL;
TRACE("(%p)->(-- pidl=%p ret=0x%08lx)\n", This, ppidl? *ppidl:0, hr);
......
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