Commit 0770ba61 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

msxml3: IXMLDOMElement::selectSingleNode always assign a value to the output parameter.

parent c237db98
......@@ -1560,6 +1560,9 @@ HRESULT node_select_singlenode(const xmlnode *This, BSTR query, IXMLDOMNode **no
IXMLDOMNodeList *list;
HRESULT hr;
if (node)
*node = NULL;
hr = node_select_nodes(This, query, &list);
if (hr == S_OK)
{
......
......@@ -2516,6 +2516,11 @@ static void test_domnode( void )
ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok( node == NULL, "node %p\n", node );
node = (void*)0xdeadbeef;
hr = IXMLDOMElement_selectSingleNode( element, _bstr_("In Valid"), &node );
ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
ok( node == NULL, "node %p\n", node );
str = SysAllocString(L"bs");
hr = IXMLDOMElement_selectSingleNode( element, str, &node );
SysFreeString(str);
......
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