d3d: Remove AddRef from IWineD3DDevice_GetRenderTarget.

This commit is contained in:
Markus Amsler 2006-11-20 10:47:43 +01:00 committed by Alexandre Julliard
parent 478a414e58
commit a7518f6f54
3 changed files with 1 additions and 5 deletions

View File

@ -677,7 +677,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 i
if (hr == D3D_OK && pRenderTarget != NULL) {
IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget);
IWineD3DResource_Release((IWineD3DResource *)pRenderTarget);
} else {
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
*ppRenderTarget = NULL;

View File

@ -403,7 +403,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetRenderTarget(LPDIRECT3DDEVICE9 i
if (hr == D3D_OK && pRenderTarget != NULL) {
IWineD3DResource_GetParent((IWineD3DResource *)pRenderTarget,(IUnknown**)ppRenderTarget);
IWineD3DResource_Release((IWineD3DResource *)pRenderTarget);
} else {
FIXME("Call to IWineD3DDevice_GetRenderTarget failed\n");
*ppRenderTarget = NULL;

View File

@ -6889,9 +6889,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetRenderTarget(IWineD3DDevice* iface
*ppRenderTarget = This->renderTarget;
TRACE("(%p) : RenderTarget %d Index returning %p\n", This, RenderTargetIndex, *ppRenderTarget);
/* Note inc ref on returned surface */
if(*ppRenderTarget != NULL)
IWineD3DSurface_AddRef(*ppRenderTarget);
return WINED3D_OK;
}