Author: mjansen
Date: Sun Jun 11 10:39:55 2017
New Revision: 74997
URL: http://svn.reactos.org/svn/reactos?rev=74997&view=rev
Log:
[SHELL32] Do not fail CFSFolder::GetDisplayNameOf with a NULL pidl, preventing another crash in shell32:CFSFolder
Modified:
trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CFSFolder.cpp [iso-8859-1] Sun Jun 11 10:39:55 2017
@@ -634,7 +634,7 @@
HRESULT WINAPI CFSFolder::GetDisplayNameOf(PCUITEMID_CHILD pidl,
DWORD dwFlags, LPSTRRET strRet)
{
- if (!pidl || !strRet)
+ if (!strRet)
return E_INVALIDARG;
/* If it is a complex pidl, let the child handle it */
@@ -642,7 +642,7 @@
{
return SHELL32_GetDisplayNameOfChild(this, pidl, dwFlags, strRet);
}
- else if (!pidl->mkid.cb) /* empty pidl */
+ else if (pidl && !pidl->mkid.cb) /* empty pidl */
{
/* If it is an empty pidl return only the path of the folder */
if ((GET_SHGDN_FOR(dwFlags) & SHGDN_FORPARSING) &&
Author: mjansen
Date: Sun Jun 11 08:51:36 2017
New Revision: 74996
URL: http://svn.reactos.org/svn/reactos?rev=74996&view=rev
Log:
[WIN32KNT_APITEST] Do not assert on the result of an unimplemented function.
Modified:
trunk/rostests/apitests/win32nt/ntgdi/NtGdiEnumFontOpen.c
Modified: trunk/rostests/apitests/win32nt/ntgdi/NtGdiEnumFontOpen.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/win32nt/ntgdi/Nt…
==============================================================================
--- trunk/rostests/apitests/win32nt/ntgdi/NtGdiEnumFontOpen.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/win32nt/ntgdi/NtGdiEnumFontOpen.c [iso-8859-1] Sun Jun 11 08:51:36 2017
@@ -19,7 +19,9 @@
// FIXME: We should load the font first
idEnum = NtGdiEnumFontOpen(hDC, 2, 0, 32, L"Courier", ANSI_CHARSET, &ulCount);
- ASSERT(idEnum != 0);
+ TEST(idEnum != 0);
+ if (idEnum == 0)
+ return;
/* we should have a gdi handle here */
TEST(GDI_HANDLE_GET_TYPE(idEnum) == GDI_OBJECT_TYPE_ENUMFONT);