Commit a307901a authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

msxml3: removeChild should catch a NULL child node.

parent 120e808f
......@@ -452,6 +452,9 @@ static HRESULT WINAPI xmlnode_removeChild(
TRACE("%p->(%p, %p)\n", This, childNode, oldChild);
*oldChild = NULL;
if(!childNode) return E_INVALIDARG;
hr = IXMLDOMNode_QueryInterface(childNode, &IID_IXMLDOMNode, (LPVOID)&child);
if(FAILED(hr))
return hr;
......
......@@ -1054,6 +1054,9 @@ static void test_removeChild(void)
r = IXMLDOMNodeList_get_item( node_list, 0, &node4 );
ok( r == S_OK, "ret %08lx\n", r);
r = IXMLDOMElement_removeChild( element, NULL, &node2 );
ok( r == E_INVALIDARG, "ret %08lx\n", r );
r = IXMLDOMElement_removeChild( element, node4, &node2 );
ok( r == S_OK, "ret %08lx\n", r);
ok( node4 == node2, "node %p node2 %p\n", node4, node2 );
......
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