Alistair Leslie-Hughes : mshtml: Stop test crash on error condition.
Alexandre Julliard
julliard at winehq.org
Tue Jun 10 13:35:24 CDT 2008
Module: wine
Branch: master
Commit: 294fe6b65bc9b9d41537527b48fb00e39c68656d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=294fe6b65bc9b9d41537527b48fb00e39c68656d
Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Tue Jun 10 22:52:56 2008 +1000
mshtml: Stop test crash on error condition.
---
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));
}
More information about the wine-cvs
mailing list