diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 8ab54299e42..fe0a98f39c4 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -84,6 +84,10 @@ ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) { IWineD3DVertexShader_Release(This->vertexShader); } + if (NULL != This->vertexDecl) { + IWineD3DVertexDeclaration_Release(This->vertexDecl); + } + /* NOTE: according to MSDN: The applicaion is responsible for making sure the texture references are cleared down */ for (counter = 0; counter < GL_LIMITS(textures); counter++) { if (This->textures[counter]) {