mshtml: Don't release window if it wasn't created.

This commit is contained in:
Jacek Caban 2007-02-13 12:21:03 +01:00 committed by Alexandre Julliard
parent b274242f9c
commit 3866ce3f7a
1 changed files with 4 additions and 1 deletions

View File

@ -162,7 +162,9 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
if(This->hwnd)
DestroyWindow(This->hwnd);
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
if(This->window)
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
release_nodes(This);
HTMLDocument_ConnectionPoints_Destroy(This);
@ -1110,6 +1112,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
ret->nscontainer = NULL;
ret->nodes = NULL;
ret->readystate = READYSTATE_UNINITIALIZED;
ret->window = NULL;
hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject);
if(FAILED(hres)) {