Commit 2616b575 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

AddRef texture only if there is one for the requested stage.

parent 1de20ae4
...@@ -3028,6 +3028,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD ...@@ -3028,6 +3028,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD
ICOM_THIS(IDirect3DDevice8Impl,iface); ICOM_THIS(IDirect3DDevice8Impl,iface);
TRACE("(%p) : returning %p for stage %ld\n", This, This->UpdateStateBlock->textures[Stage], Stage); TRACE("(%p) : returning %p for stage %ld\n", This, This->UpdateStateBlock->textures[Stage], Stage);
*ppTexture = (LPDIRECT3DBASETEXTURE8) This->UpdateStateBlock->textures[Stage]; *ppTexture = (LPDIRECT3DBASETEXTURE8) This->UpdateStateBlock->textures[Stage];
if (*ppTexture)
IDirect3DBaseTexture8Impl_AddRef(*ppTexture); IDirect3DBaseTexture8Impl_AddRef(*ppTexture);
return D3D_OK; return D3D_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