Commit afe14ab9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

quartz: Don't fail if the filter CLSID doesn't exist.

parent 71bd11bc
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment