mshtml: Don't release window if it wasn't created.
This commit is contained in:
parent
b274242f9c
commit
3866ce3f7a
|
@ -162,7 +162,9 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
|
||||||
if(This->hwnd)
|
if(This->hwnd)
|
||||||
DestroyWindow(This->hwnd);
|
DestroyWindow(This->hwnd);
|
||||||
|
|
||||||
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
|
if(This->window)
|
||||||
|
IHTMLWindow2_Release(HTMLWINDOW2(This->window));
|
||||||
|
|
||||||
release_nodes(This);
|
release_nodes(This);
|
||||||
|
|
||||||
HTMLDocument_ConnectionPoints_Destroy(This);
|
HTMLDocument_ConnectionPoints_Destroy(This);
|
||||||
|
@ -1110,6 +1112,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
|
||||||
ret->nscontainer = NULL;
|
ret->nscontainer = NULL;
|
||||||
ret->nodes = NULL;
|
ret->nodes = NULL;
|
||||||
ret->readystate = READYSTATE_UNINITIALIZED;
|
ret->readystate = READYSTATE_UNINITIALIZED;
|
||||||
|
ret->window = NULL;
|
||||||
|
|
||||||
hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject);
|
hres = IHTMLDocument_QueryInterface(HTMLDOC(ret), riid, ppvObject);
|
||||||
if(FAILED(hres)) {
|
if(FAILED(hres)) {
|
||||||
|
|
Loading…
Reference in New Issue