Skip to content
Snippets Groups Projects
Commit 90bd6dc3 authored by gofman1's avatar gofman1 Committed by Alexandre Julliard
Browse files

d3d8: Fix crash in d3d8_vertexbuffer_Release().

parent a878b0fa
No related branches found
No related tags found
No related merge requests found
......@@ -74,12 +74,13 @@ static ULONG WINAPI d3d8_vertexbuffer_Release(IDirect3DVertexBuffer8 *iface)
if (!refcount)
{
struct wined3d_buffer *draw_buffer = buffer->draw_buffer;
IDirect3DDevice8 *device = buffer->parent_device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
if (buffer->draw_buffer)
wined3d_buffer_decref(buffer->draw_buffer);
if (draw_buffer)
wined3d_buffer_decref(draw_buffer);
wined3d_mutex_unlock();
/* Release the device last, as it may cause the device to be destroyed. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment