Commit b0dd7c79 authored by Zhenbo Li's avatar Zhenbo Li Committed by Alexandre Julliard

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

parent 6419ac0f
......@@ -432,6 +432,9 @@ static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG i
HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
nsresult nsres;
TRACE("(%p)->(%d)\n", This, index);
if(index < 0)
return E_INVALIDARG;
nsres = nsIDOMHTMLSelectElement_select_Remove(This->nsselect, index);
if(NS_FAILED(nsres)) {
ERR("Remove failed: %08x\n", nsres);
......
......@@ -2872,7 +2872,6 @@ static void test_select_remove(IHTMLSelectElement *select)
test_select_length(select, 2);
hres = IHTMLSelectElement_remove(select, -1);
todo_wine
ok(hres == E_INVALIDARG, "remove failed: %08x, expected E_INVALIDARG\n", hres);
test_select_length(select, 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment