quartz: Added some error checking on failure to CreateClassEnumerator.
This commit is contained in:
parent
2e5a48be43
commit
ccad96578d
|
@ -962,9 +962,14 @@ static HRESULT WINAPI FilterMapper2_EnumMatchingFilters(
|
||||||
*ppEnum = NULL;
|
*ppEnum = NULL;
|
||||||
|
|
||||||
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (LPVOID*)&pCreateDevEnum);
|
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, &IID_ICreateDevEnum, (LPVOID*)&pCreateDevEnum);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
if (SUCCEEDED(hr))
|
hr = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum, &CLSID_ActiveMovieCategories, &pEnumCat, 0);
|
||||||
hr = ICreateDevEnum_CreateClassEnumerator(pCreateDevEnum, &CLSID_ActiveMovieCategories, &pEnumCat, 0);
|
if (FAILED(hr)) {
|
||||||
|
ICreateDevEnum_Release(pCreateDevEnum);
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
while (IEnumMoniker_Next(pEnumCat, 1, &pMonikerCat, NULL) == S_OK)
|
while (IEnumMoniker_Next(pEnumCat, 1, &pMonikerCat, NULL) == S_OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue