[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    Revert [5] "d3d: Remove AddRef from IWineD3DDevice_GetTexture."
From:       Markus Amsler <markus.amsler () oribi ! org>
Date:       2006-11-30 12:33:29
Message-ID: 456ECF99.5070500 () oribi ! org
[Download RAW message or body]

This reverts commit 274df6ef88fb16da6c61fc891db74042fec0bfc5.
---
   dlls/d3d8/device.c    |    1 +
   dlls/d3d9/device.c    |    1 +
   dlls/ddraw/device.c   |    1 +
   dlls/wined3d/device.c |    2 ++
   4 files changed, 5 insertions(+), 0 deletions(-)


["5b8d0a49ac328a5018b68f750da458dbe82d2415.diff" (text/x-patch)]

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 2da8063..2c9329f 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -963,6 +963,7 @@ static HRESULT WINAPI IDirect3DDevice8Im
     rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture);
     if (rc == D3D_OK && NULL != retTexture) {
         IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
+        IWineD3DBaseTexture_Release(retTexture);
     } else {
         FIXME("Call to get texture  (%d) failed (%p)\n", Stage, retTexture);
         *ppTexture = NULL;
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index 62c79c1..34a2e1c 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -595,6 +595,7 @@ static HRESULT  WINAPI  IDirect3DDevice9
     rc = IWineD3DDevice_GetTexture(This->WineD3DDevice, Stage, (IWineD3DBaseTexture **)&retTexture);
     if (rc == D3D_OK && NULL != retTexture) {
         IWineD3DBaseTexture_GetParent(retTexture, (IUnknown **)ppTexture);
+        IWineD3DBaseTexture_Release(retTexture);
     }else{
         FIXME("Call to get texture  (%d) failed (%p)\n", Stage, retTexture);
         *ppTexture = NULL;
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 11435cf..cfbbba9 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -2130,6 +2130,7 @@ IDirect3DDeviceImpl_7_GetRenderState(IDi
                     *Value = texImpl->Handle;
                     IDirectDrawSurface7_Release(parent);
                 }
+                IWineD3DBaseTexture_Release(tex);
             }
             return hr;
         }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 616cf4c..26e24c6 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5836,6 +5836,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         return WINED3DERR_INVALIDCALL;
     }
     *ppTexture=This->stateBlock->textures[Stage];
+    if (*ppTexture)
+        IWineD3DBaseTexture_AddRef(*ppTexture);
 
     return WINED3D_OK;
 }






[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic