msxml: It's valid to release an empty document.
This commit is contained in:
parent
1b9fc2a170
commit
a48bb7b3de
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -513,6 +513,13 @@ static void test_refs(void)
|
|||
LONG ref;
|
||||
IUnknown *unk, *unk2;
|
||||
|
||||
r = CoCreateInstance( &CLSID_DOMDocument, NULL,
|
||||
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 )
|
||||
|
|
Loading…
Reference in New Issue