Module: wine Branch: master Commit: a4ad2cf82505c1458419103b66cfd02d41f7ccf3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=a4ad2cf82505c1458419103b6... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 12 23:28:26 2018 +0100 mshtml: Handle non-HTML element in IHTMLSelectElement:add implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlselect.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c index 5a116a7..8f33941 100644 --- a/dlls/mshtml/htmlselect.c +++ b/dlls/mshtml/htmlselect.c @@ -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);