D3D9: In IDirect3DTexture9_GetSurfaceLevel, add a reference to the texture

H. Verbeet hverbeet at gmail.com
Tue Dec 20 15:23:01 CST 2005


Calling GetSurfaceLevel on a texture should add a reference to the
texture. Verified on win2k, DirectX 9.0c.

Changelog:
  - In IDirect3DTexture9_GetSurfaceLevel, add a reference to the texture.
-------------- next part --------------
diff --git a/dlls/d3d9/texture.c b/dlls/d3d9/texture.c
index e5340c5..00458ac 100644
--- a/dlls/d3d9/texture.c
+++ b/dlls/d3d9/texture.c
@@ -180,6 +180,7 @@ HRESULT WINAPI IDirect3DTexture9Impl_Get
     TRACE("(%p) Relay\n", This);
     hrc = IWineD3DTexture_GetSurfaceLevel(This->wineD3DTexture, Level, &mySurface);
     if (hrc == D3D_OK && NULL != ppSurfaceLevel) {
+       IDirect3DTexture9_AddRef(iface);
        IWineD3DSurface_GetParent(mySurface, (IUnknown **)ppSurfaceLevel);
        IWineD3DSurface_Release(mySurface);
     }


More information about the wine-patches mailing list