Commit 9936ec0c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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

parent c208d973
......@@ -2492,6 +2492,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i
{
IDirect3DDevice9Impl *This = impl_from_IDirect3DDevice9Ex(iface);
struct wined3d_buffer *retStream = NULL;
IDirect3DVertexBuffer9Impl *buffer_impl;
HRESULT hr;
TRACE("iface %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
......@@ -2505,7 +2506,8 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetStreamSource(IDirect3DDevice9Ex *i
hr = wined3d_device_get_stream_source(This->wined3d_device, StreamNumber, &retStream, OffsetInBytes, pStride);
if (SUCCEEDED(hr) && retStream)
{
*pStream = wined3d_buffer_get_parent(retStream);
buffer_impl = wined3d_buffer_get_parent(retStream);
*pStream = &buffer_impl->IDirect3DVertexBuffer9_iface;
IDirect3DVertexBuffer9_AddRef(*pStream);
wined3d_buffer_decref(retStream);
}
......
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