quartz: Don't fail if the filter CLSID doesn't exist.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
71bd11bc6b
commit
afe14ab9b0
dlls/quartz
|
@ -1523,22 +1523,25 @@ static HRESULT WINAPI FilterMapper_UnregisterFilter(IFilterMapper * iface, CLSID
|
|||
strcatW(wszKeyName, wszClsid);
|
||||
|
||||
lRet = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszKeyName, 0, KEY_WRITE, &hKey);
|
||||
if (lRet == ERROR_FILE_NOT_FOUND)
|
||||
goto done;
|
||||
hr = HRESULT_FROM_WIN32(lRet);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
lRet = RegDeleteValueW(hKey, wszMeritName);
|
||||
if (lRet != ERROR_SUCCESS)
|
||||
if (lRet != ERROR_SUCCESS && lRet != ERROR_FILE_NOT_FOUND)
|
||||
hr = HRESULT_FROM_WIN32(lRet);
|
||||
|
||||
lRet = RegDeleteTreeW(hKey, wszPins);
|
||||
if (lRet != ERROR_SUCCESS)
|
||||
if (lRet != ERROR_SUCCESS && lRet != ERROR_FILE_NOT_FOUND)
|
||||
hr = HRESULT_FROM_WIN32(lRet);
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
done:
|
||||
CoTaskMemFree(wszClsid);
|
||||
|
||||
return hr;
|
||||
|
|
|
@ -297,6 +297,12 @@ static void test_legacy_filter_registration(void)
|
|||
ret = RegDeleteKeyW(HKEY_CLASSES_ROOT, key_name);
|
||||
ok(!ret, "RegDeleteKeyA failed: %lu\n", ret);
|
||||
|
||||
hr = IFilterMapper_RegisterFilter(mapper, clsid, testfilterW, MERIT_UNLIKELY);
|
||||
ok(hr == S_OK, "RegisterFilter failed: %#x\n", hr);
|
||||
|
||||
hr = IFilterMapper_UnregisterFilter(mapper, clsid);
|
||||
ok(hr == S_OK, "FilterMapper_UnregisterFilter failed with %x\n", hr);
|
||||
|
||||
IFilterMapper_Release(mapper);
|
||||
IFilterMapper2_Release(mapper2);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue