[SHELL32] - Accept NULL pidl in CRegFolder::GetDisplayNameOf. CORE-12317

svn path=/trunk/; revision=73236
This commit is contained in:
Giannis Adamopoulos 2016-11-15 14:25:05 +00:00
parent 4a5fe31949
commit 46512f3a37

View file

@ -356,10 +356,10 @@ HRESULT WINAPI CRegFolder::GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CH
HRESULT WINAPI CRegFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
{
if (!strRet || !_ILIsSpecialFolder(pidl))
if (!strRet || (!_ILIsSpecialFolder(pidl) && pidl != NULL))
return E_INVALIDARG;
if (!pidl->mkid.cb)
if (!pidl || !pidl->mkid.cb)
{
if ((GET_SHGDN_RELATION(dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING))
{