shell32: Fail properly when no pidl is passed to SHCreateShellItem.
This commit is contained in:
parent
026c37e747
commit
1d57a31d92
|
@ -276,7 +276,11 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
|
|||
|
||||
TRACE("(%p,%p,%p,%p)\n", pidlParent, psfParent, pidl, ppsi);
|
||||
|
||||
if (!pidlParent && !psfParent && pidl)
|
||||
if (!pidl)
|
||||
{
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
else if (!pidlParent && !psfParent)
|
||||
{
|
||||
new_pidl = ILClone(pidl);
|
||||
if (!new_pidl)
|
||||
|
|
|
@ -1783,7 +1783,7 @@ static void test_SHCreateShellItem(void)
|
|||
pidl_abstestfile = pILCombine(pidl_cwd, pidl_testfile);
|
||||
|
||||
ret = pSHCreateShellItem(NULL, NULL, NULL, &shellitem);
|
||||
todo_wine ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret);
|
||||
ok(ret == E_INVALIDARG, "SHCreateShellItem returned %x\n", ret);
|
||||
|
||||
if (0) /* crashes on Windows XP */
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue