WINED3D: Release the vertex declaration during stateblock cleanup

H. Verbeet hverbeet at gmail.com
Thu Feb 9 15:09:39 CST 2006


At the moment, IWineD3DStateBlockImpl_Release doesn't release the
vertex declaration, although it should.

Changelog:
  - Release the vertex declaration during stateblock cleanup
-------------- next part --------------
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 8ab5429..fe0a98f 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -84,6 +84,10 @@ ULONG WINAPI IWineD3DStateBlockImpl_Rele
                 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]) {


More information about the wine-patches mailing list