[PATCH 2/5] ddraw: Properly retrieve an interface pointer in IDirect3DDeviceImpl_7_GetTexture().

Henri Verbeet hverbeet at codeweavers.com
Mon Apr 9 13:43:39 CDT 2012


---
 dlls/ddraw/device.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 47ee68a..89404ee 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -4563,6 +4563,7 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface,
 {
     IDirect3DDeviceImpl *This = impl_from_IDirect3DDevice7(iface);
     struct wined3d_texture *wined3d_texture;
+    struct ddraw_surface *surface;
     HRESULT hr;
 
     TRACE("iface %p, stage %u, texture %p.\n", iface, Stage, Texture);
@@ -4582,7 +4583,8 @@ IDirect3DDeviceImpl_7_GetTexture(IDirect3DDevice7 *iface,
         return hr;
     }
 
-    *Texture = wined3d_texture_get_parent(wined3d_texture);
+    surface = wined3d_texture_get_parent(wined3d_texture);
+    *Texture = &surface->IDirectDrawSurface7_iface;
     IDirectDrawSurface7_AddRef(*Texture);
     wined3d_texture_decref(wined3d_texture);
     wined3d_mutex_unlock();
-- 
1.7.3.4




More information about the wine-patches mailing list