From fa49b9f22604691627d2273a5fa603d8a0066df1 Mon Sep 17 00:00:00 2001 From: Paul Chitescu Date: Wed, 30 Jun 2010 18:52:17 +0300 Subject: [PATCH] mshtml: Do not try to use IDocHostUIHandler for context menu if hostui is NULL. --- dlls/mshtml/olecmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c index 4d5967a923f..851189bf509 100644 --- a/dlls/mshtml/olecmd.c +++ b/dlls/mshtml/olecmd.c @@ -898,11 +898,9 @@ void show_context_menu(HTMLDocumentObj *This, DWORD dwID, POINT *ppt, IDispatch { HMENU menu_res, menu; DWORD cmdid; - HRESULT hres; - hres = IDocHostUIHandler_ShowContextMenu(This->hostui, dwID, ppt, - (IUnknown*)CMDTARGET(&This->basedoc), elem); - if(hres == S_OK) + if(This->hostui && S_OK == IDocHostUIHandler_ShowContextMenu(This->hostui, + dwID, ppt, (IUnknown*)CMDTARGET(&This->basedoc), elem)) return; menu_res = LoadMenuW(get_shdoclc(), MAKEINTRESOURCEW(IDR_BROWSE_CONTEXT_MENU));