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

msxml: It's valid to release an empty document.

parent 1b9fc2a1
......@@ -743,7 +743,7 @@ static ULONG WINAPI Internal_Release(
ref = InterlockedDecrement( &This->ref );
if ( ref == 0 )
{
assert( This->node->doc );
if( This->node )
xmldoc_release( This->node->doc );
HeapFree( GetProcessHeap(), 0, This );
}
......
......@@ -517,6 +517,13 @@ static void test_refs(void)
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
if( r != S_OK )
return;
ref = IXMLDOMDocument_Release(doc);
ok( ref == 0, "ref %ld\n", ref);
r = CoCreateInstance( &CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (LPVOID*)&doc );
if( r != S_OK )
return;
str = SysAllocString( szComplete4 );
r = IXMLDOMDocument_loadXML( doc, str, &b );
......
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