Commit c528ef47 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/presenter: Fix error handling on object creation.

parent 409392df
......@@ -1207,13 +1207,18 @@ HRESULT evr_presenter_create(IUnknown *outer, void **out)
InitializeCriticalSection(&object->cs);
if (FAILED(hr = DXVA2CreateDirect3DDeviceManager9(&object->reset_token, &object->device_manager)))
IUnknown_Release(&object->IUnknown_inner);
goto failed;
if (FAILED(hr = video_presenter_init_d3d(object)))
IUnknown_Release(&object->IUnknown_inner);
goto failed;
if (SUCCEEDED(hr))
*out = &object->IUnknown_inner;
*out = &object->IUnknown_inner;
return S_OK;
failed:
IUnknown_Release(&object->IUnknown_inner);
return hr;
}
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