Jacek Caban : urlmon: Fixed crash on old IE.

Alexandre Julliard julliard at winehq.org
Thu Feb 21 07:42:26 CST 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Feb 20 21:30:00 2008 +0100

urlmon: Fixed crash on old IE.

---

 dlls/urlmon/tests/url.c |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c
index e11855f..5c8505c 100644
--- a/dlls/urlmon/tests/url.c
+++ b/dlls/urlmon/tests/url.c
@@ -1819,26 +1819,27 @@ static void test_bscholder(IBindStatusCallback *holder)
     IHttpNegotiate_Release(http_negotiate_serv);
 
     hres = IBindStatusCallback_QueryInterface(holder, &IID_IHttpNegotiate2, (void**)&http_negotiate2);
-    ok(hres == S_OK, "Could not get IHttpNegotiate2 interface: %08x\n", hres);
-
-    hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0);
-    ok(hres == E_FAIL, "GetRootSecurityId failed: %08x\n", hres);
-
-    IHttpNegotiate_Release(http_negotiate2);
+    if(SUCCEEDED(hres)) {
+        hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0);
+        ok(hres == E_FAIL, "GetRootSecurityId failed: %08x\n", hres);
 
-    SET_EXPECT(QueryInterface_IHttpNegotiate2);
-    hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2,
-                                         (void**)&http_negotiate2_serv);
-    ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres);
-    CHECK_CALLED(QueryInterface_IHttpNegotiate2);
-    ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n");
+        SET_EXPECT(QueryInterface_IHttpNegotiate2);
+        hres = IServiceProvider_QueryService(serv_prov, &IID_IHttpNegotiate2, &IID_IHttpNegotiate2,
+                                             (void**)&http_negotiate2_serv);
+        ok(hres == S_OK, "Could not get IHttpNegotiate2 service: %08x\n", hres);
+        CHECK_CALLED(QueryInterface_IHttpNegotiate2);
+        ok(http_negotiate2 == http_negotiate2_serv, "http_negotiate != http_negotiate_serv\n");
 
-    SET_EXPECT(GetRootSecurityId);
-    hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0);
-    ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres);
-    CHECK_CALLED(GetRootSecurityId);
+        SET_EXPECT(GetRootSecurityId);
+        hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, (void*)0xdeadbeef, (void*)0xdeadbeef, 0);
+        ok(hres == E_NOTIMPL, "GetRootSecurityId failed: %08x\n", hres);
+        CHECK_CALLED(GetRootSecurityId);
 
-    IHttpNegotiate_Release(http_negotiate2_serv);
+        IHttpNegotiate_Release(http_negotiate2_serv);
+        IHttpNegotiate_Release(http_negotiate2);
+    }else {
+        skip("Could not get IHttpNegotiate2\n");
+    }
 
     SET_EXPECT(OnProgress_FINDINGRESOURCE);
     hres = IBindStatusCallback_OnProgress(holder, 0, 0, BINDSTATUS_FINDINGRESOURCE, NULL);




More information about the wine-cvs mailing list