Commit 02cb4fe2 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d9: Properly retrieve an interface pointer in d3d9_texture_cube_GetCubeMapSurface().

parent c85f6c94
......@@ -740,6 +740,7 @@ static HRESULT WINAPI d3d9_texture_cube_GetCubeMapSurface(IDirect3DCubeTexture9
{
struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface);
struct wined3d_resource *sub_resource;
IDirect3DSurface9Impl *surface_impl;
UINT sub_resource_idx;
TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, face, level, surface);
......@@ -752,7 +753,8 @@ static HRESULT WINAPI d3d9_texture_cube_GetCubeMapSurface(IDirect3DCubeTexture9
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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment