MSHTML: Avoid crash if test fails

Felix Nawothnig felix.nawothnig at t-online.de
Fri Jul 15 10:38:13 CDT 2005


ChangeLog:
Skip futile tests if CoGetClassObject fails
-------------- next part --------------
Index: dlls/mshtml/tests/protocol.c
===================================================================
RCS file: /home/wine/wine/dlls/mshtml/tests/protocol.c,v
retrieving revision 1.1
diff -u -p -r1.1 protocol.c
--- dlls/mshtml/tests/protocol.c	30 Jun 2005 18:11:57 -0000	1.1
+++ dlls/mshtml/tests/protocol.c	15 Jul 2005 15:36:24 -0000
@@ -235,6 +235,8 @@ static void test_res_protocol(void)
 
     hres = CoGetClassObject(&CLSID_ResProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
     ok(hres == S_OK, "CoGetClassObject failed: %08lx\n", hres);
+    if(!SUCCEEDED(hres))
+        return;
 
     hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&protocol_info);
     ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08lx\n", hres);


More information about the wine-patches mailing list