[QUARTZ]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 21 Mar 2010 19:02:37 +0000 (19:02 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 21 Mar 2010 19:02:37 +0000 (19:02 +0000)
sync quartz with wine 1.1.41

svn path=/trunk/; revision=46311

reactos/dll/directx/quartz/filtermapper.c

index 7b8d954..bacb729 100644 (file)
@@ -479,11 +479,16 @@ static HRESULT WINAPI FilterMapper2_UnregisterFilter(
 static HRESULT FM2_WriteFriendlyName(IPropertyBag * pPropBag, LPCWSTR szName)
 {
     VARIANT var;
 static HRESULT FM2_WriteFriendlyName(IPropertyBag * pPropBag, LPCWSTR szName)
 {
     VARIANT var;
+    HRESULT ret;
+    BSTR value;
 
     V_VT(&var) = VT_BSTR;
 
     V_VT(&var) = VT_BSTR;
-    V_UNION(&var, bstrVal) = (BSTR)szName;
+    V_UNION(&var, bstrVal) = value = SysAllocString(szName);
 
 
-    return IPropertyBag_Write(pPropBag, wszFriendlyName, &var);
+    ret = IPropertyBag_Write(pPropBag, wszFriendlyName, &var);
+    SysFreeString(value);
+
+    return ret;
 }
 
 static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid)
 }
 
 static HRESULT FM2_WriteClsid(IPropertyBag * pPropBag, REFCLSID clsid)