dmusic/tests: Don't crash with old dmusic versions.

Michael Stefaniuc mstefani at redhat.de
Mon Dec 30 16:25:56 CST 2013


---
The old WTB Win2k boxes stumble over this.


 dlls/dmusic/tests/dmusic.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c
index c425840..ced2336 100644
--- a/dlls/dmusic/tests/dmusic.c
+++ b/dlls/dmusic/tests/dmusic.c
@@ -245,6 +245,11 @@ static void test_COM(void)
     /* Same refcount for DirectMusic and DirectMusic8 */
     hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8,
             (void**)&dm8);
+    if (hr == E_NOINTERFACE)
+    {
+        win_skip("DirectMusic too old (no IDirectMusic8)\n");
+        return;
+    }
     ok(hr == S_OK, "DirectMusic8 create failed: %08x, expected S_OK\n", hr);
     refcount = IDirectMusic8_AddRef(dm8);
     ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
-- 
1.8.3.1



More information about the wine-patches mailing list