d3d9: Properly retrieve an interface pointer in d3d9_texture_2d_GetSurfaceLevel().
This commit is contained in:
parent
9936ec0c1c
commit
605e6b743c
|
@ -326,6 +326,7 @@ static HRESULT WINAPI d3d9_texture_2d_GetSurfaceLevel(IDirect3DTexture9 *iface,
|
|||
{
|
||||
struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface);
|
||||
struct wined3d_resource *sub_resource;
|
||||
IDirect3DSurface9Impl *surface_impl;
|
||||
|
||||
TRACE("iface %p, level %u, surface %p.\n", iface, level, surface);
|
||||
|
||||
|
@ -336,7 +337,8 @@ static HRESULT WINAPI d3d9_texture_2d_GetSurfaceLevel(IDirect3DTexture9 *iface,
|
|||
return D3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
*surface = wined3d_resource_get_parent(sub_resource);
|
||||
surface_impl = wined3d_resource_get_parent(sub_resource);
|
||||
*surface = &surface_impl->IDirect3DSurface9_iface;
|
||||
IDirect3DSurface9_AddRef(*surface);
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
|
|
Loading…
Reference in New Issue