[SHELL32] SHCreateShellFolderView(): Fix parameter validation order. (#1632)

Fixes one modification from commit ae2a85d0.
CORE-16098
This commit is contained in:
Serge Gautherie 2019-06-09 15:57:45 +02:00 committed by Hermès BÉLUSCA - MAÏTO
parent c1421c4108
commit 8a8453494f

View file

@ -3449,14 +3449,17 @@ HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv,
CComPtr<IShellView> psv;
HRESULT hRes;
if (!ppsv || !pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
if (!ppsv)
return E_INVALIDARG;
*ppsv = NULL;
if (!pcsfv || pcsfv->cbSize != sizeof(*pcsfv))
return E_INVALIDARG;
TRACE("sf=%p outer=%p callback=%p\n",
pcsfv->pshf, pcsfv->psvOuter, pcsfv->psfvcb);
*ppsv = NULL;
hRes = CDefView_CreateInstance(pcsfv->pshf, IID_PPV_ARG(IShellView, &psv));
if (FAILED(hRes))
return hRes;