summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixMenu.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-08-14 12:30:11 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-08-14 12:30:11 (GMT)
commit1ea6a2802aa9cad7de2d34747034400617e51c34 (patch)
treea0993c8ba95537dbcf5674ddc3d90f21971488ad /unix/tkUnixMenu.c
parent5586adc5a179b62eb9f3cd1c260e8fda97f85c2f (diff)
downloadtk-1ea6a2802aa9cad7de2d34747034400617e51c34.zip
tk-1ea6a2802aa9cad7de2d34747034400617e51c34.tar.gz
tk-1ea6a2802aa9cad7de2d34747034400617e51c34.tar.bz2
Make test suite pass without crashes from TIP#109 changes...
Diffstat (limited to 'unix/tkUnixMenu.c')
-rw-r--r--unix/tkUnixMenu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c
index 302edaf..1e6a682 100644
--- a/unix/tkUnixMenu.c
+++ b/unix/tkUnixMenu.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixMenu.c,v 1.8 2003/08/14 10:31:14 dkf Exp $
+ * RCS: @(#) $Id: tkUnixMenu.c,v 1.9 2003/08/14 12:30:11 dkf Exp $
*/
#include "tkPort.h"
@@ -1346,7 +1346,7 @@ TkpDrawMenuEntry(mePtr, d, tkfont, menuMetricsPtr, x, y, width, height,
{
GC gc, indicatorGC;
XColor *indicatorColor;
- XColor *disableColor;
+ XColor *disableColor = NULL;
TkMenu *menuPtr = mePtr->menuPtr;
Tk_3DBorder bgBorder, activeBorder;
CONST Tk_FontMetrics *fmPtr;
@@ -1409,7 +1409,10 @@ TkpDrawMenuEntry(mePtr, d, tkfont, menuMetricsPtr, x, y, width, height,
menuPtr->indicatorFgPtr);
}
- disableColor = Tk_GetColorFromObj(menuPtr->tkwin, menuPtr->disabledFgPtr);
+ if (menuPtr->disabledFgPtr != NULL) {
+ disableColor = Tk_GetColorFromObj(menuPtr->tkwin,
+ menuPtr->disabledFgPtr);
+ }
bgBorder = Tk_Get3DBorderFromObj(menuPtr->tkwin,
(mePtr->borderPtr == NULL)