Jacek Caban : mshtml: Call Exec in show_context_menu only if user selected menu item.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 10 10:18:04 CDT 2007


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Sep  9 20:11:32 2007 +0200

mshtml: Call Exec in show_context_menu only if user selected menu item.

---

 dlls/mshtml/olecmd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index c481e6a..88c456a 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -873,7 +873,8 @@ void show_context_menu(HTMLDocument *This, DWORD dwID, POINT *ppt)
             ppt->x, ppt->y, 0, This->hwnd, NULL);
     DestroyMenu(menu_res);
 
-    IOleCommandTarget_Exec(CMDTARGET(This), &CGID_MSHTML, cmdid, 0, NULL, NULL);
+    if(cmdid)
+        IOleCommandTarget_Exec(CMDTARGET(This), &CGID_MSHTML, cmdid, 0, NULL, NULL);
 }
 
 void HTMLDocument_OleCmd_Init(HTMLDocument *This)




More information about the wine-cvs mailing list