WINED3D: Release the container during surface / volume cleanup

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


Release the container during surface / volume cleanup. This should
have been part of
http://source.winehq.org/git/?p=wine.git;a=commit;h=e43cfb1a688f529bc75f040987f48892bbd03cc8
of course.

Changelog:
  - Release the container during surface / volume cleanup
-------------- next part --------------
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 722816a..ab25c96 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -69,6 +69,9 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release
             glDeleteTextures(1, &This->glDescription.textureName);
             LEAVE_GL();
         }
+        if (This->container) {
+            IWineD3DBase_Release(This->container);
+        }
         IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
 
         TRACE("(%p) Released\n", This);
diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c
index 3108662..0c367bc 100644
--- a/dlls/wined3d/volume.c
+++ b/dlls/wined3d/volume.c
@@ -55,6 +55,9 @@ ULONG WINAPI IWineD3DVolumeImpl_Release(
     TRACE("(%p) : Releasing from %ld\n", This, This->resource.ref);
     ref = InterlockedDecrement(&This->resource.ref);
     if (ref == 0) {
+        if (This->container) {
+            IWineD3DBase_Release(This->container);
+        }
         IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
         HeapFree(GetProcessHeap(), 0, This);
     }




More information about the wine-patches mailing list