msxml3: Fix NULL ptr checking in domdoc test (Coverity).

This commit is contained in:
Marcus Meissner 2009-11-23 09:42:48 +01:00 committed by Alexandre Julliard
parent fa7c2b5c5f
commit 80995b684b
1 changed files with 12 additions and 14 deletions

View File

@ -1030,6 +1030,10 @@ static void test_domnode( void )
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
if( r != S_OK )
return;
if (!doc) {
ok( FALSE, "no document\n");
return;
}
b = FALSE;
str = SysAllocString( szComplete4 );
@ -1038,8 +1042,6 @@ static void test_domnode( void )
ok( b == VARIANT_TRUE, "failed to load XML string\n");
SysFreeString( str );
if (doc)
{
b = 1;
r = IXMLDOMNode_hasChildNodes( doc, &b );
ok( r == S_OK, "hasChildNoes bad return\n");
@ -1048,9 +1050,6 @@ static void test_domnode( void )
r = IXMLDOMDocument_get_documentElement( doc, &element );
ok( r == S_OK, "should be a document element\n");
ok( element != NULL, "should be an element\n");
}
else
ok( FALSE, "no document\n");
VariantInit(&var);
ok( V_VT(&var) == VT_EMPTY, "variant init failed\n");
@ -1439,7 +1438,6 @@ todo_wine
if (element)
IXMLDOMElement_Release( element );
if (doc)
ok(IXMLDOMDocument_Release( doc ) == 0, "document is not destroyed\n");
}