mshtml: Handle non-HTML element in IHTMLSelectElement:add implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-02-12 23:28:26 +01:00 committed by Alexandre Julliard
parent fba6da7982
commit a4ad2cf825
1 changed files with 6 additions and 1 deletions

View File

@ -425,6 +425,11 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem
return E_INVALIDARG;
}
if(!element_obj->html_element) {
FIXME("Not HTML element\n");
return E_NOTIMPL;
}
nsvariant = create_nsvariant();
if(!nsvariant)
return E_FAIL;
@ -444,7 +449,7 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem
}
if(NS_SUCCEEDED(nsres))
nsres = nsIDOMHTMLSelectElement_Add(This->nsselect, element_obj->nselem, (nsIVariant*)nsvariant);
nsres = nsIDOMHTMLSelectElement_Add(This->nsselect, element_obj->html_element, (nsIVariant*)nsvariant);
nsIWritableVariant_Release(nsvariant);
if(NS_FAILED(nsres)) {
ERR("Add failed: %08x\n", nsres);