Commit cae90acb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d8: Properly retrieve an interface pointer in IDirect3DCubeTexture8Impl_GetCubeMapSurface().

parent e24e6eb2
......@@ -285,6 +285,7 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(IDirect3DCubeT
{
IDirect3DCubeTexture8Impl *texture = impl_from_IDirect3DCubeTexture8(iface);
struct wined3d_resource *sub_resource;
IDirect3DSurface8Impl *surface_impl;
UINT sub_resource_idx;
TRACE("iface %p, face %#x, level %u, surface %p.\n", iface, face, level, surface);
......@@ -297,7 +298,8 @@ static HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(IDirect3DCubeT
return D3DERR_INVALIDCALL;
}
*surface = wined3d_resource_get_parent(sub_resource);
surface_impl = wined3d_resource_get_parent(sub_resource);
*surface = &surface_impl->IDirect3DSurface8_iface;
IDirect3DSurface8_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