[PATCH] stop crash on error condition

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Jun 10 07:52:56 CDT 2008


---
 dlls/mshtml/tests/dom.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index a3d0701..ad06e5b 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -885,6 +885,9 @@ static void test_elem_col_item(IHTMLElementCollection *col, LPCWSTR n,
     hres = IDispatch_QueryInterface(disp, &IID_IHTMLElementCollection, (void**)&elcol);
     IDispatch_Release(disp);
     ok(hres == S_OK, "Could not get IHTMLElementCollection interface: %08x\n", hres);
+    if(hres != S_OK)
+        goto cleanup;
+
     test_elem_collection(elcol, elem_types, len);
     IHTMLElementCollection_Release(elcol);
 
@@ -916,6 +919,7 @@ static void test_elem_col_item(IHTMLElementCollection *col, LPCWSTR n,
     ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres);
     ok(disp == NULL, "disp != NULL\n");
 
+cleanup:
     SysFreeString(V_BSTR(&name));
 }
 
-- 
1.5.4.1


--------------020209060208040109070201--




More information about the wine-patches mailing list