Commit b3c5d2cc authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dx9: Skip the AddRef/Release calls if the new texture is the same as the old one.

parent 96b0b917
......@@ -2409,6 +2409,9 @@ static HRESULT d3dx9_base_effect_set_texture(struct d3dx9_base_effect *base,
{
struct IDirect3DBaseTexture9 *oltexture = *(struct IDirect3DBaseTexture9 **)param->data;
if (texture == oltexture)
return D3D_OK;
if (texture) IDirect3DBaseTexture9_AddRef(texture);
if (oltexture) IDirect3DBaseTexture9_Release(oltexture);
......
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