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

This commit is contained in:
Jacek Caban 2008-10-10 15:47:47 -05:00 committed by Alexandre Julliard
parent 8db98e9eb6
commit 5e7cf7987f
1 changed files with 7 additions and 5 deletions

View File

@ -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));