mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
d3d9: Properly retrieve an interface pointer in IDirect3DDevice9Impl_GetTexture().
This commit is contained in:
parent
e333334450
commit
3e2d946290
1 changed files with 3 additions and 1 deletions
|
@ -1691,6 +1691,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface,
|
|||
{
|
||||
IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface);
|
||||
struct wined3d_texture *wined3d_texture = NULL;
|
||||
struct d3d9_texture *texture_impl;
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, ppTexture);
|
||||
|
@ -1703,7 +1704,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetTexture(IDirect3DDevice9Ex *iface,
|
|||
hr = wined3d_device_get_texture(This->wined3d_device, Stage, &wined3d_texture);
|
||||
if (SUCCEEDED(hr) && wined3d_texture)
|
||||
{
|
||||
*ppTexture = wined3d_texture_get_parent(wined3d_texture);
|
||||
texture_impl = wined3d_texture_get_parent(wined3d_texture);
|
||||
*ppTexture = &texture_impl->IDirect3DBaseTexture9_iface;
|
||||
IDirect3DBaseTexture9_AddRef(*ppTexture);
|
||||
wined3d_texture_decref(wined3d_texture);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue