summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/tkWinMenu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 425e8e9..d7f5d48 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.39 2005/01/09 00:26:59 chengyemao Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.40 2005/01/09 06:59:20 chengyemao Exp $
*/
#define OEMRESOURCE
@@ -1142,7 +1142,7 @@ TkWinHandleMenuEvent(phwnd, pMessage, pwParam, plParam, plResult)
case WM_MEASUREITEM: {
LPMEASUREITEMSTRUCT itemPtr = (LPMEASUREITEMSTRUCT) *plParam;
- if (itemPtr != NULL) {
+ if (itemPtr != NULL && tsdPtr->modalMenuPtr != NULL) {
mePtr = (TkMenuEntry *) itemPtr->itemData;
menuPtr = mePtr->menuPtr;
@@ -1171,7 +1171,7 @@ TkWinHandleMenuEvent(phwnd, pMessage, pwParam, plParam, plResult)
Tk_FontMetrics fontMetrics;
int drawArrow = 0;
- if (itemPtr != NULL) {
+ if (itemPtr != NULL && tsdPtr->modalMenuPtr != NULL) {
Tk_Font tkfont;
mePtr = (TkMenuEntry *) itemPtr->itemData;