mshtml: Properly handle NULL VT_DISPATCH refChild in IHTMLDOMNode::insertBefore.
This commit is contained in:
parent
d2c936d4af
commit
13df042891
|
@ -513,6 +513,8 @@ static HRESULT WINAPI HTMLDOMNode_insertBefore(IHTMLDOMNode *iface, IHTMLDOMNode
|
|||
case VT_NULL:
|
||||
break;
|
||||
case VT_DISPATCH: {
|
||||
if(!V_DISPATCH(&refChild))
|
||||
break;
|
||||
ref_node = get_node_obj(This->doc, (IUnknown*)V_DISPATCH(&refChild));
|
||||
if(!ref_node) {
|
||||
ERR("unvalid node\n");
|
||||
|
|
|
@ -5920,6 +5920,13 @@ static void test_create_elems(IHTMLDocument2 *doc)
|
|||
test_elem_innertext(body, "insert test");
|
||||
test_elem_innerhtml((IUnknown*)body, "insert test");
|
||||
|
||||
node = test_create_text(doc, " Test");
|
||||
V_VT(&var) = VT_DISPATCH;
|
||||
V_DISPATCH(&var) = NULL;
|
||||
test_node_insertbefore((IUnknown*)body, node, &var);
|
||||
test_elem_innertext(body, "insert test Test");
|
||||
IHTMLDOMNode_Release(node);
|
||||
|
||||
hres = IHTMLDocument2_QueryInterface(doc, &IID_IHTMLDocument5, (void**)&doc5);
|
||||
if(hres == S_OK)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue