wined3d: Release the container during surface / volume cleanup.

This commit is contained in:
H. Verbeet 2006-02-10 14:52:20 +01:00 committed by Alexandre Julliard
parent 75ac954cf5
commit bac34c35aa
2 changed files with 6 additions and 0 deletions

View File

@ -69,6 +69,9 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
glDeleteTextures(1, &This->glDescription.textureName);
LEAVE_GL();
}
if (This->container) {
IWineD3DBase_Release(This->container);
}
IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
TRACE("(%p) Released\n", This);

View File

@ -55,6 +55,9 @@ ULONG WINAPI IWineD3DVolumeImpl_Release(IWineD3DVolume *iface) {
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);
}