From 294fe6b65bc9b9d41537527b48fb00e39c68656d Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 10 Jun 2008 22:52:56 +1000 Subject: [PATCH] mshtml: Stop test crash on error condition. --- dlls/mshtml/tests/dom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index a3d0701ec34..ad06e5bf264 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)); } -- 2.11.4.GIT