From 024b5c2245c374bedc7685bd8539b7010bc38227 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 3 Apr 2011 23:35:30 +0200 Subject: [PATCH] ddraw: Do not unset the index buffer on D3D device destruction. --- dlls/ddraw/device.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 54e549f787b..9f8a6ddef9a 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -288,14 +288,12 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface) DWORD i; EnterCriticalSection(&ddraw_cs); - /* Free the index buffer. */ - IWineD3DDevice_SetIndexBuffer(This->wineD3DDevice, NULL, WINED3DFMT_UNKNOWN); - wined3d_buffer_decref(This->indexbuffer); - /* There is no need to unset the vertex buffer here, IWineD3DDevice_Uninit3D will do that when - * destroying the primary stateblock. If a vertex buffer is destroyed while it is bound - * IDirect3DVertexBuffer::Release will unset it. - */ + /* There is no need to unset any resources here, wined3d will take + * care of that on Uninit3D(). */ + + /* Free the index buffer. */ + wined3d_buffer_decref(This->indexbuffer); /* Set the device up to render to the front buffer since the back * buffer will vanish soon. */