msxml: Fix for no children

Huw D M Davies h.davies1 at physics.ox.ac.uk
Wed Jan 11 09:13:35 CST 2006


	Huw Davies <huw at codeweavers.com>
	Fix for selectNodes when the node has no children.
-- 
Huw Davies
huw at codeweavers.com
diff --git a/dlls/msxml3/node.c b/dlls/msxml3/node.c
index 06f21ea..44d4b8f 100644
--- a/dlls/msxml3/node.c
+++ b/dlls/msxml3/node.c
@@ -613,6 +613,9 @@ static HRESULT WINAPI xmlnode_selectNode
     if (!str)
         return r;
 
+    if( !This->node->children )
+        return S_FALSE;
+
     *resultList = create_filtered_nodelist( This->node->children, str );
     HeapFree( GetProcessHeap(), 0, str );
     return S_OK;
@@ -630,7 +633,7 @@ static HRESULT WINAPI xmlnode_selectSing
     TRACE("%p %s %p\n", This, debugstr_w(queryString), resultNode );
 
     r = IXMLDOMNode_selectNodes(iface, queryString, &list);
-    if(SUCCEEDED(r))
+    if(r == S_OK)
     {
         r = IXMLDOMNodeList_nextNode(list, resultNode);
         IXMLDOMNodeList_Release(list);



More information about the wine-patches mailing list