[PATCH] ddraw/tests: Properly clean up in test_texcoordindex v4.

Stefan Dösinger stefan at codeweavers.com
Thu Aug 27 17:22:36 CDT 2015


---
 dlls/ddraw/tests/ddraw4.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index eed5f334..6ac725d 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -9415,7 +9415,7 @@ static void test_texcoordindex(void)
     }
 
     hr = IDirect3DDevice3_GetDirect3D(device, &d3d);
-    ok(SUCCEEDED(hr), "Failed to get Direct3D7 interface, hr %#x.\n", hr);
+    ok(SUCCEEDED(hr), "Failed to get Direct3D3 interface, hr %#x.\n", hr);
     hr = IDirect3D3_QueryInterface(d3d, &IID_IDirectDraw4, (void **)&ddraw);
     ok(SUCCEEDED(hr), "Failed to get DirectDraw4 interface, hr %#x.\n", hr);
     IDirect3D3_Release(d3d);
@@ -9545,10 +9545,14 @@ static void test_texcoordindex(void)
     color = get_surface_color(rt, 480, 360);
     ok(compare_color(color, 0x00ffff00, 2), "Got unexpected color 0x%08x.\n", color);
 
-    IDirectDrawSurface7_Release(texture1);
-    IDirectDrawSurface7_Release(texture2);
+    IDirect3DTexture2_Release(texture2);
+    IDirect3DTexture2_Release(texture1);
+    IDirectDrawSurface4_Release(surface2);
+    IDirectDrawSurface4_Release(surface1);
+
+    destroy_viewport(device, viewport);
 
-    IDirectDrawSurface7_Release(rt);
+    IDirectDrawSurface4_Release(rt);
     IDirectDraw_Release(ddraw);
     refcount = IDirect3DDevice3_Release(device);
     ok(!refcount, "Device has %u references left.\n", refcount);
-- 
2.4.6




More information about the wine-patches mailing list