quartz: Fix variant handling in GetFilterInfo.
Removes unnecessary and unsafe type assignment, adds a missing VariantClear.
This commit is contained in:
parent
7c5a4481b1
commit
1cd83afda3
|
@ -773,7 +773,6 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, GUID* pclsid, VARIANT* pvar)
|
|||
HRESULT hr;
|
||||
|
||||
VariantInit(pvar);
|
||||
V_VT(pvar) = VT_BSTR;
|
||||
|
||||
hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
|
||||
|
||||
|
@ -783,6 +782,8 @@ static HRESULT GetFilterInfo(IMoniker* pMoniker, GUID* pclsid, VARIANT* pvar)
|
|||
if (SUCCEEDED(hr))
|
||||
hr = CLSIDFromString(V_UNION(pvar, bstrVal), pclsid);
|
||||
|
||||
VariantClear(pvar);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue