Commit 74ab8e8c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Do not increment the reference count of the returned buffer in…

wined3d: Do not increment the reference count of the returned buffer in wined3d_device_get_stream_source(). None of the other getters increment the reference count either.
parent b5a91d12
......@@ -2798,7 +2798,6 @@ static HRESULT WINAPI d3d8_device_GetStreamSource(IDirect3DDevice8 *iface,
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
*buffer = &buffer_impl->IDirect3DVertexBuffer8_iface;
IDirect3DVertexBuffer8_AddRef(*buffer);
wined3d_buffer_decref(wined3d_buffer);
}
else
{
......
......@@ -2769,7 +2769,6 @@ static HRESULT WINAPI d3d9_device_GetStreamSource(IDirect3DDevice9Ex *iface,
buffer_impl = wined3d_buffer_get_parent(wined3d_buffer);
*buffer = &buffer_impl->IDirect3DVertexBuffer9_iface;
IDirect3DVertexBuffer9_AddRef(*buffer);
wined3d_buffer_decref(wined3d_buffer);
}
else
{
......
......@@ -159,8 +159,6 @@ static ULONG WINAPI d3d_vertex_buffer7_Release(IDirect3DVertexBuffer7 *iface)
0, &curVB, &offset, &stride);
if (curVB == buffer->wineD3DVertexBuffer)
wined3d_device_set_stream_source(buffer->ddraw->wined3d_device, 0, NULL, 0, 0);
if (curVB)
wined3d_buffer_decref(curVB); /* For the GetStreamSource */
wined3d_vertex_declaration_decref(buffer->wineD3DVertexDeclaration);
wined3d_buffer_decref(buffer->wineD3DVertexBuffer);
......
......@@ -1276,8 +1276,6 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi
stream = &device->state.streams[stream_idx];
*buffer = stream->buffer;
if (*buffer)
wined3d_buffer_incref(*buffer);
if (offset)
*offset = stream->offset;
*stride = stream->stride;
......
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