[PATCH] ddrawex/tests: Handle DirectDraw4 not supported on NT4

Detlef Riekenberg wine.dev at web.de
Sun Aug 5 16:17:35 CDT 2012


--
By by ... Detlef
---
 dlls/ddrawex/tests/ddrawex.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c
index 7a6440b..8b866a3 100644
--- a/dlls/ddrawex/tests/ddrawex.c
+++ b/dlls/ddrawex/tests/ddrawex.c
@@ -77,17 +77,21 @@ static void RefCountTest(void)
     ok(ref == 3, "IDirectDraw3 refcount is %u, expected 3\n", ref);
 
     IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4);
-    ref = get_ref((IUnknown *) dd4);
-    ok(ref == 4, "IDirectDraw4 refcount is %u, expected 4\n", ref);
+    /* DirectDraw4 not supported on NT4 */
+    if (dd4) {
+        ref = get_ref((IUnknown *) dd4);
+        ok(ref == 4, "IDirectDraw4 refcount is %u, expected 4\n", ref);
+    }
 
     IDirectDraw_Release(dd1);
     IDirectDraw2_Release(dd2);
     IDirectDraw3_Release(dd3);
 
-    ref = get_ref((IUnknown *) dd4);
-    ok(ref == 1, "IDirectDraw4 refcount is %u, expected 1\n", ref);
-
-    IDirectDraw4_Release(dd4);
+    if (dd4) {
+        ref = get_ref((IUnknown *) dd4);
+        ok(ref == 1, "IDirectDraw4 refcount is %u, expected 1\n", ref);
+        IDirectDraw4_Release(dd4);
+    }
 }
 
 START_TEST(ddrawex)
-- 
1.7.5.4




More information about the wine-patches mailing list