Commit f6bf2190 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Remove some redundant code in IWineD3DVertexDeclarationImpl_Release().

The situation the code tests for should never happen because either the stateblock will still have a reference to the vertex declaration, or the stateblock itself will be released.
parent dca3c6e7
......@@ -68,13 +68,8 @@ static ULONG WINAPI IWineD3DVertexDeclarationImpl_Release(IWineD3DVertexDeclarat
ULONG ref;
TRACE("(%p) : Releasing from %d\n", This, This->ref);
ref = InterlockedDecrement(&This->ref);
if (ref == 0) {
if (This->wineD3DDevice->stateBlock && iface == This->wineD3DDevice->stateBlock->vertexDecl)
if (!ref)
{
/* See comment in PixelShader::Release */
IWineD3DDeviceImpl_MarkStateDirty(This->wineD3DDevice, STATE_VDECL);
}
HeapFree(GetProcessHeap(), 0, This->elements);
This->parent_ops->wined3d_object_destroyed(This->parent);
HeapFree(GetProcessHeap(), 0, This);
......
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