mshtml: Fix error handler in IHTMLSelectElement::remove().

This commit is contained in:
Zhenbo Li 2015-08-07 18:12:58 +08:00 committed by Alexandre Julliard
parent 6419ac0f13
commit b0dd7c79d3
2 changed files with 3 additions and 1 deletions

View File

@ -432,6 +432,9 @@ static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG i
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface); HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
nsresult nsres; nsresult nsres;
TRACE("(%p)->(%d)\n", This, index); TRACE("(%p)->(%d)\n", This, index);
if(index < 0)
return E_INVALIDARG;
nsres = nsIDOMHTMLSelectElement_select_Remove(This->nsselect, index); nsres = nsIDOMHTMLSelectElement_select_Remove(This->nsselect, index);
if(NS_FAILED(nsres)) { if(NS_FAILED(nsres)) {
ERR("Remove failed: %08x\n", nsres); ERR("Remove failed: %08x\n", nsres);

View File

@ -2872,7 +2872,6 @@ static void test_select_remove(IHTMLSelectElement *select)
test_select_length(select, 2); test_select_length(select, 2);
hres = IHTMLSelectElement_remove(select, -1); hres = IHTMLSelectElement_remove(select, -1);
todo_wine
ok(hres == E_INVALIDARG, "remove failed: %08x, expected E_INVALIDARG\n", hres); ok(hres == E_INVALIDARG, "remove failed: %08x, expected E_INVALIDARG\n", hres);
test_select_length(select, 2); test_select_length(select, 2);