mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
quartz: Don't set the VideoRenderer object on creation failure.
This commit is contained in:
parent
d28971a23e
commit
eb6388c4a5
1 changed files with 7 additions and 5 deletions
|
@ -668,8 +668,6 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
*ppv = pVideoRenderer;
|
|
||||||
|
|
||||||
hr = BaseControlWindow_Init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter, &pVideoRenderer->renderer.pInputPin->pin, &renderer_BaseWindowFuncTable);
|
hr = BaseControlWindow_Init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter, &pVideoRenderer->renderer.pInputPin->pin, &renderer_BaseWindowFuncTable);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -678,10 +676,14 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (!CreateRenderingSubsystem(pVideoRenderer))
|
if (!CreateRenderingSubsystem(pVideoRenderer)) {
|
||||||
return E_FAIL;
|
hr = E_FAIL;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
*ppv = pVideoRenderer;
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
return hr;
|
|
||||||
fail:
|
fail:
|
||||||
BaseRendererImpl_Release(&pVideoRenderer->renderer.filter.IBaseFilter_iface);
|
BaseRendererImpl_Release(&pVideoRenderer->renderer.filter.IBaseFilter_iface);
|
||||||
CoTaskMemFree(pVideoRenderer);
|
CoTaskMemFree(pVideoRenderer);
|
||||||
|
|
Loading…
Reference in a new issue