Commit 274df6ef authored by Markus Amsler's avatar Markus Amsler Committed by Alexandre Julliard

d3d: Remove AddRef from IWineD3DDevice_GetTexture.

parent 18546a65
...@@ -963,7 +963,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, D ...@@ -963,7 +963,6 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, D
rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture);
if (rc == D3D_OK && NULL != retTexture) { if (rc == D3D_OK && NULL != retTexture) {
IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
IWineD3DBaseTexture_Release(retTexture);
} else { } else {
FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture);
*ppTexture = NULL; *ppTexture = NULL;
......
...@@ -595,7 +595,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(LPDIRECT3DDEVICE9 iface, ...@@ -595,7 +595,6 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(LPDIRECT3DDEVICE9 iface,
rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture); rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture);
if (rc == D3D_OK && NULL != retTexture) { if (rc == D3D_OK && NULL != retTexture) {
IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture); IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
IWineD3DBaseTexture_Release(retTexture);
}else{ }else{
FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture); FIXME("Call to get texture (%d) failed (%p)\n", Stage, retTexture);
*ppTexture = NULL; *ppTexture = NULL;
......
...@@ -2130,7 +2130,6 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface, ...@@ -2130,7 +2130,6 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
*Value = texImpl->Handle; *Value = texImpl->Handle;
IDirectDrawSurface7_Release(parent); IDirectDrawSurface7_Release(parent);
} }
IWineD3DBaseTexture_Release(tex);
} }
return hr; return hr;
} }
......
...@@ -5827,8 +5827,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD ...@@ -5827,8 +5827,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetTexture(IWineD3DDevice *iface, DWORD
return WINED3DERR_INVALIDCALL; return WINED3DERR_INVALIDCALL;
} }
*ppTexture=This->stateBlock->textures[Stage]; *ppTexture=This->stateBlock->textures[Stage];
if (*ppTexture)
IWineD3DBaseTexture_AddRef(*ppTexture);
return WINED3D_OK; return WINED3D_OK;
} }
......
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