Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/d3dx9_36/effect.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 7635caa878..32db4a80ae 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -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,12 +3533,14 @@ static HRESULT WINAPI d3dx_effect_GetPool(ID3DXEffect *iface, ID3DXEffectPool ** return D3DERR_INVALIDCALL; }
- if (This->pool) + if (effect->pool) { - This->pool->lpVtbl->AddRef(This->pool); + *pool = effect->pool; + (*pool)->lpVtbl->AddRef(*pool); } + else + *pool = NULL;
- *pool = This->pool;
TRACE("Returning pool %p\n", *pool);