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

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 14 09:25:32 CST 2007


Module: wine
Branch: master
Commit: 3866ce3f7ab3e43a0fd5bfcb34a192d89ab3ee07
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3866ce3f7ab3e43a0fd5bfcb34a192d89ab3ee07

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Feb 13 12:21:03 2007 +0100

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

---

 dlls/mshtml/htmldoc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 3414d67..65c1996 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -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)) {




More information about the wine-cvs mailing list