Matteo Bruni : ddraw/tests: Fix ddraw2 test_lighting() cleanup code.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 23 07:04:14 CDT 2015


Module: wine
Branch: master
Commit: 969e72396dfe5217c8a984b8dfa22a027f90aad1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=969e72396dfe5217c8a984b8dfa22a027f90aad1

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Apr 22 19:30:32 2015 +0200

ddraw/tests: Fix ddraw2 test_lighting() cleanup code.

---

 dlls/ddraw/tests/ddraw2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 6ed3b0e..11248f5 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -6639,6 +6639,8 @@ static void test_lighting(void)
         ok(color == tests[i].expected, "%s has color 0x%08x.\n", tests[i].message, color);
     }
 
+    hr = IDirect3DViewport2_DeleteLight(viewport, light);
+    ok(SUCCEEDED(hr), "Failed to remove a light from the viewport, hr %#x.\n", hr);
     IDirect3DLight_Release(light);
     destroy_material(material);
     destroy_viewport(device, viewport);
@@ -6646,7 +6648,7 @@ static void test_lighting(void)
     refcount = IDirect3DDevice2_Release(device);
     ok(!refcount, "Device has %u references left.\n", refcount);
     IDirect3D2_Release(d3d);
-    IDirectDraw2_Release(ddraw);
+    refcount = IDirectDraw2_Release(ddraw);
     ok(!refcount, "Ddraw object has %u references left.\n", refcount);
     DestroyWindow(window);
 }




More information about the wine-cvs mailing list