d3dx9: Avoid using 'This' in d3dx_effect_GetPool().

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Michael Stefaniuc 2019-03-22 19:09:52 +01:00 committed by Alexandre Julliard
parent 64b5d6b3e5
commit 3bd0fc3d6a
1 changed files with 7 additions and 7 deletions

View File

@ -3523,9 +3523,9 @@ static HRESULT WINAPI d3dx_effect_SetArrayRange(ID3DXEffect *iface, D3DXHANDLE p
/*** ID3DXEffect methods ***/
static HRESULT WINAPI d3dx_effect_GetPool(ID3DXEffect *iface, ID3DXEffectPool **pool)
{
struct d3dx_effect *This = impl_from_ID3DXEffect(iface);
struct d3dx_effect *effect = impl_from_ID3DXEffect(iface);
TRACE("iface %p, pool %p\n", This, pool);
TRACE("iface %p, pool %p.\n", effect, pool);
if (!pool)
{
@ -3533,14 +3533,14 @@ static HRESULT WINAPI d3dx_effect_GetPool(ID3DXEffect *iface, ID3DXEffectPool **
return D3DERR_INVALIDCALL;
}
if (This->pool)
*pool = NULL;
if (effect->pool)
{
This->pool->lpVtbl->AddRef(This->pool);
*pool = effect->pool;
(*pool)->lpVtbl->AddRef(*pool);
}
*pool = This->pool;
TRACE("Returning pool %p\n", *pool);
TRACE("Returning pool %p.\n", *pool);
return S_OK;
}