msxml3: Correct handling of listLength == NULL in IXMLDOMNamedNodeMap::get_length.

This commit is contained in:
Michael Karcher 2008-10-11 23:58:02 +02:00 committed by Alexandre Julliard
parent dfc5a00cb0
commit c729305511
2 changed files with 6 additions and 0 deletions

View File

@ -364,6 +364,9 @@ static HRESULT WINAPI xmlnodemap_get_length(
TRACE("%p\n", This);
if( !listLength )
return E_INVALIDARG;
node = xmlNodePtr_from_domnode( This->node, 0 );
if ( !node )
return E_FAIL;

View File

@ -1003,6 +1003,9 @@ todo_wine
SysFreeString( str );
/* test indexed access of attributes */
r = IXMLDOMNamedNodeMap_get_length( map, NULL );
ok ( r == E_INVALIDARG, "get_length should return E_INVALIDARG\n");
r = IXMLDOMNamedNodeMap_get_length( map, &count );
ok ( r == S_OK, "get_length wrong code\n");
ok ( count == 1, "get_length != 1\n");