From ae5a2128c7739c9556295faad71108b0793a6817 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Tue, 16 Dec 2003 03:12:51 +0000 Subject: (ReconfigureWindowsMenu) : Only redraw the menubar when a menubar exists. Although the invalid handle doesn't cause an exception, it was discovered with NuMega's BoundsChecker and flagged as a problem. --- win/tkWinMenu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 7f3f866..bf8c2d4 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.24 2003/10/31 08:55:03 vincentdarley Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.25 2003/12/16 03:12:51 davygrvy Exp $ */ #define OEMRESOURCE @@ -680,7 +680,11 @@ ReconfigureWindowsMenu( if ((menuPtr->menuType == MENUBAR) && (menuPtr->parentTopLevelPtr != NULL)) { - DrawMenuBar(TkWinGetWrapperWindow(menuPtr->parentTopLevelPtr)); + HANDLE bar; + bar = TkWinGetWrapperWindow(menuPtr->parentTopLevelPtr); + if (bar) { + DrawMenuBar(bar); + } Tk_GeometryRequest(menuPtr->parentTopLevelPtr, width, height); } -- cgit v0.12