https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e48c20b3b6b4290387ab…
commit 7e48c20b3b6b4290387abbc459ac15702c8374bf
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Tue Feb 20 11:48:40 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Tue Feb 20 11:48:40 2018 +0200
[SHELL32] Fix a couple of tests
---
dll/win32/shell32/CShellItem.cpp | 3 ++-
dll/win32/shell32/folders/CDesktopFolder.cpp | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/CShellItem.cpp b/dll/win32/shell32/CShellItem.cpp
index d684870c05..1e06c8cff8 100644
--- a/dll/win32/shell32/CShellItem.cpp
+++ b/dll/win32/shell32/CShellItem.cpp
@@ -250,6 +250,8 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi);
+ *ppsi = NULL;
+
if (!pidl)
return E_INVALIDARG;
@@ -291,7 +293,6 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
hr = CShellItem::_CreatorClass::CreateInstance(NULL, IID_PPV_ARG(IShellItem,
&newShellItem));
if (FAILED(hr))
{
- *ppsi = NULL;
ILFree(new_pidl);
return hr;
}
diff --git a/dll/win32/shell32/folders/CDesktopFolder.cpp
b/dll/win32/shell32/folders/CDesktopFolder.cpp
index fc52702696..9a1a452ea8 100644
--- a/dll/win32/shell32/folders/CDesktopFolder.cpp
+++ b/dll/win32/shell32/folders/CDesktopFolder.cpp
@@ -819,6 +819,9 @@ HRESULT WINAPI CDesktopFolder::Initialize(LPCITEMIDLIST pidl)
{
TRACE ("(%p)->(%p)\n", this, pidl);
+ if (!pidl)
+ return S_OK;
+
return E_INVALIDARG;
}