From 274df6ef88fb16da6c61fc891db74042fec0bfc5 Mon Sep 17 00:00:00 2001 From: Markus Amsler Date: Mon, 20 Nov 2006 10:47:56 +0100 Subject: [PATCH] d3d: Remove AddRef from IWineD3DDevice_GetTexture. --- dlls/d3d8/device.c | 1 - dlls/d3d9/device.c | 1 - dlls/ddraw/device.c | 1 - dlls/wined3d/device.c | 2 -- 4 files changed, 5 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 2c9329fd019..2da80633984 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -963,7 +963,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, D rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); if (rc == D3D_OK && NULL != retTexture) { IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); - IWineD3DBaseTexture_Release(retTexture); } else { FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); *ppTexture = NULL; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 34a2e1c34c5..62c79c17319 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -595,7 +595,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(LPDIRECT3DDEVICE9 iface, rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); if (rc == D3D_OK && NULL != retTexture) { IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); - IWineD3DBaseTexture_Release(retTexture); }else{ FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); *ppTexture = NULL; diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index cfbbba9faca..11435cfa957 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2130,7 +2130,6 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, *Value = texImpl->Handle; IDirectDrawSurface7_Release(parent); } - IWineD3DBaseTexture_Release(tex); } return hr; } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 9812c6f40dc..9f9b5a941b5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -5827,8 +5827,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD return WINED3DERR_INVALIDCALL; } *ppTexture=This->stateBlock->textures[Stage]; - if (*ppTexture) - IWineD3DBaseTexture_AddRef(*ppTexture); return WINED3D_OK; }