[PATCH 2/3] d3d9/tests: Reset texture 0 to NULL at the end of texop_test().

Matteo Bruni mbruni at codeweavers.com
Wed Jun 19 14:59:25 CDT 2013


While it doesn't really matter for the test results (it only affects the
alpha component of the following test but that isn't checked anyway) I feel
it's a good idea to properly cleanup and avoid dependencies between
tests.
---
 dlls/d3d9/tests/visual.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index dc84559..73f5066 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -10179,8 +10179,9 @@ static void texop_test(IDirect3DDevice9 *device)
         ok(SUCCEEDED(hr), "Present failed with 0x%08x\n", hr);
     }
 
-    if (texture) IDirect3DTexture9_Release(texture);
-    if (vertex_declaration) IDirect3DVertexDeclaration9_Release(vertex_declaration);
+    hr = IDirect3DDevice9_SetTexture(device, 0, NULL);
+    IDirect3DTexture9_Release(texture);
+    IDirect3DVertexDeclaration9_Release(vertex_declaration);
 }
 
 static void yuv_color_test(IDirect3DDevice9 *device) {
-- 
1.8.1.5




More information about the wine-patches mailing list