Commit 3866ce3f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent b274242f
......@@ -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)) {
......
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