d3dx9: Skip the AddRef/Release calls if the new texture is the same as the old one.
This commit is contained in:
parent
96b0b91752
commit
b3c5d2ccda
dlls/d3dx9_36
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue