Author: khornicek
Date: Thu Mar 11 20:42:59 2010
New Revision: 46112
URL:
http://svn.reactos.org/svn/reactos?rev=46112&view=rev
Log:
[SHELL32]
- according to msdn ppidl should be set to NULL if an error occurs
- fixes shlfolder winetest crash
Modified:
trunk/reactos/dll/win32/shell32/shellord.c
Modified: trunk/reactos/dll/win32/shell32/shellord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellord…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellord.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellord.c [iso-8859-1] Thu Mar 11 20:42:59 2010
@@ -2244,12 +2244,21 @@
HRESULT hr=E_FAIL;
ULONG dwAttr=sfgaoIn;
- if (!pszName || !ppidl || !psfgaoOut)
+ if(!ppidl)
return E_INVALIDARG;
+
+ if (!pszName || !psfgaoOut)
+ {
+ *ppidl = NULL;
+ return E_INVALIDARG;
+ }
hr = SHGetDesktopFolder(&psfDesktop);
if (FAILED(hr))
+ {
+ *ppidl = NULL;
return hr;
+ }
hr = IShellFolder_ParseDisplayName(psfDesktop, (HWND)NULL, pbc, (LPOLESTR)pszName,
(ULONG *)NULL, ppidl, &dwAttr);
@@ -2257,6 +2266,8 @@
if (SUCCEEDED(hr))
*psfgaoOut = dwAttr;
+ else
+ *ppidl = NULL;
return hr;
}