Alexander Dorofeyev : quartz: Fix variant handling in GetFilterInfo.
Alexandre Julliard
julliard at winehq.org
Fri Jul 18 06:46:13 CDT 2008
Module: wine
Branch: master
Commit: 1cd83afda34bb70582865ad15c56f447a3d842da
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1cd83afda34bb70582865ad15c56f447a3d842da
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Thu Jul 17 20:25:22 2008 +0300
quartz: Fix variant handling in GetFilterInfo.
Removes unnecessary and unsafe type assignment, adds a missing VariantClear.
---
dlls/quartz/filtergraph.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c
index 9ebf026..6bc61e5 100644
--- a/dlls/quartz/filtergraph.c
+++ b/dlls/quartz/filtergraph.c
@@ -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);
More information about the wine-cvs
mailing list