Author: gadamopoulos
Date: Tue Nov 15 14:25:05 2016
New Revision: 73236
URL:
http://svn.reactos.org/svn/reactos?rev=73236&view=rev
Log:
[SHELL32] - Accept NULL pidl in CRegFolder::GetDisplayNameOf. CORE-12317
Modified:
trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CRegFolder.cpp [iso-8859-1] Tue Nov 15
14:25:05 2016
@@ -356,10 +356,10 @@
HRESULT WINAPI CRegFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET
strRet)
{
- if (!strRet || !_ILIsSpecialFolder(pidl))
- return E_INVALIDARG;
-
- if (!pidl->mkid.cb)
+ if (!strRet || (!_ILIsSpecialFolder(pidl) && pidl != NULL))
+ return E_INVALIDARG;
+
+ if (!pidl || !pidl->mkid.cb)
{
if ((GET_SHGDN_RELATION(dwFlags) == SHGDN_NORMAL) &&
(GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING))
{