From ca48dcde173803f4b3dee3224432cc96b1751c15 Mon Sep 17 00:00:00 2001 From: chengyemao Date: Sun, 9 Jan 2005 06:59:20 +0000 Subject: bug fix [637653] --- win/tkWinMenu.c | 6 +++--- 1 file 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; -- cgit v0.12