quartz: Don't set the VideoRenderer object on creation failure.

This commit is contained in:
Michael Stefaniuc 2012-07-02 01:05:01 +02:00 committed by Alexandre Julliard
parent d28971a23e
commit eb6388c4a5
1 changed files with 7 additions and 5 deletions

View File

@ -668,8 +668,6 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr))
goto fail;
*ppv = pVideoRenderer;
hr = BaseControlWindow_Init(&pVideoRenderer->baseControlWindow, &IVideoWindow_VTable, &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter, &pVideoRenderer->renderer.pInputPin->pin, &renderer_BaseWindowFuncTable);
if (FAILED(hr))
goto fail;
@ -678,10 +676,14 @@ HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
if (FAILED(hr))
goto fail;
if (!CreateRenderingSubsystem(pVideoRenderer))
return E_FAIL;
if (!CreateRenderingSubsystem(pVideoRenderer)) {
hr = E_FAIL;
goto fail;
}
*ppv = pVideoRenderer;
return S_OK;
return hr;
fail:
BaseRendererImpl_Release(&pVideoRenderer->renderer.filter.IBaseFilter_iface);
CoTaskMemFree(pVideoRenderer);