summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authordavygrvy <davygrvy>2003-12-16 03:12:51 (GMT)
committerdavygrvy <davygrvy>2003-12-16 03:12:51 (GMT)
commitae5a2128c7739c9556295faad71108b0793a6817 (patch)
tree4fd11247b4cb90851945936d57afbfb0bb7871c2 /win/tkWinMenu.c
parent7f8895ca18b1eb8b2de203c75bab2d4d2db809c9 (diff)
downloadtk-ae5a2128c7739c9556295faad71108b0793a6817.zip
tk-ae5a2128c7739c9556295faad71108b0793a6817.tar.gz
tk-ae5a2128c7739c9556295faad71108b0793a6817.tar.bz2
(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.
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c8
1 files 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);
}