Jacek Caban : mshtml: Don't crash in UIActivate if hostui is NULL.

Alexandre Julliard julliard at winehq.org
Mon Oct 13 06:37:36 CDT 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Oct 10 15:47:47 2008 -0500

mshtml: Don't crash in UIActivate if hostui is NULL.

---

 dlls/mshtml/view.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c
index 4c0d0c5..bba0f23 100644
--- a/dlls/mshtml/view.c
+++ b/dlls/mshtml/view.c
@@ -605,11 +605,13 @@ static HRESULT WINAPI OleDocumentView_UIActivate(IOleDocumentView *iface, BOOL f
             return hres;
         }
 
-        hres = IDocHostUIHandler_ShowUI(This->hostui,
-                This->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
-                ACTOBJ(This), CMDTARGET(This), This->frame, This->ip_window);
-        if(FAILED(hres))
-            IDocHostUIHandler_HideUI(This->hostui);
+        if(This->hostui) {
+            hres = IDocHostUIHandler_ShowUI(This->hostui,
+                    This->usermode == EDITMODE ? DOCHOSTUITYPE_AUTHOR : DOCHOSTUITYPE_BROWSE,
+                    ACTOBJ(This), CMDTARGET(This), This->frame, This->ip_window);
+            if(FAILED(hres))
+                IDocHostUIHandler_HideUI(This->hostui);
+        }
 
         if(This->ip_window)
             call_set_active_object(This->ip_window, ACTOBJ(This));




More information about the wine-cvs mailing list