H. Verbeet : wined3d: Release the correct vertexdeclaration in
Module: wine Branch: refs/heads/master Commit: b9193cc93ffedfac241a61ab7a350b8feb30179d URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b9193cc93ffedfac241a61ab... Author: H. Verbeet <hverbeet(a)gmail.com> Date: Mon Feb 6 11:31:57 2006 +0100 wined3d: Release the correct vertexdeclaration in IWineD3DDeviceImpl_SetVertexDeclaration. --- dlls/wined3d/device.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6277ff5..6b1d3cf 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3773,6 +3773,7 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetSci HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IWineD3DVertexDeclaration* pDecl) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface; + IWineD3DVertexDeclaration *oldDecl = This->updateStateBlock->vertexDecl; TRACE("(%p) : pDecl=%p\n", This, pDecl); @@ -3787,8 +3788,8 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVer if (NULL != pDecl) { IWineD3DVertexDeclaration_AddRef(pDecl); } - if (NULL != This->updateStateBlock->vertexDecl) { - IWineD3DVertexDeclaration_Release(This->updateStateBlock->vertexDecl); + if (NULL != oldDecl) { + IWineD3DVertexDeclaration_Release(oldDecl); } return D3D_OK; }
participants (1)
-
Alexandre Julliard