diff options
author | hobbs <hobbs> | 2004-03-16 19:55:02 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2004-03-16 19:55:02 (GMT) |
commit | a69b5b4fefe30134396d6269d0eca5fff4ba8500 (patch) | |
tree | 79182f00af4a2c19cc4fe1cbd8f3af2e851d0c87 | |
parent | 826320aef91bdc7dcc8b0effa68677c7db2ceb39 (diff) | |
download | tk-a69b5b4fefe30134396d6269d0eca5fff4ba8500.zip tk-a69b5b4fefe30134396d6269d0eca5fff4ba8500.tar.gz tk-a69b5b4fefe30134396d6269d0eca5fff4ba8500.tar.bz2 |
* unix/tkUnixButton.c (TkpDrawCheckIndicator): correct crash
condition for new radio/checkbuttons when colors are exhausted.
[Bug 915330] (griffin)
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | unix/tkUnixButton.c | 10 |
2 files changed, 24 insertions, 3 deletions
@@ -1,3 +1,20 @@ +2004-03-16 Jeff Hobbs <jeffh@ActiveState.com> + + * unix/tkUnixButton.c (TkpDrawCheckIndicator): correct crash + condition for new radio/checkbuttons when colors are exhausted. + [Bug 915330] (griffin) + + * generic/tkGrid.c (GridRowColumnConfigureCommand): fix lint warning + + * generic/tkCanvUtil.c: fix cast warnings + + * generic/tkTextImage.c (EmbImageConfigure): fix casts + + * unix/tkUnixSelect.c (ConvertSelection, TkSelPropProc): fix casts + + * unix/configure, unix/tcl.m4: add -Wno-strict-aliasing for GCC to + suppress useless type puning warnings. + 2004-03-08 David Gravereaux <davygrvy@pobox.com> * win/makefile.vc: diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c index ef6d866..4f9e8dc 100644 --- a/unix/tkUnixButton.c +++ b/unix/tkUnixButton.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: tkUnixButton.c,v 1.17 2004/02/18 00:40:24 hobbs Exp $ + * RCS: @(#) $Id: tkUnixButton.c,v 1.18 2004/03/16 19:55:12 hobbs Exp $ */ #include "tkButton.h" @@ -244,12 +244,16 @@ TkpDrawCheckIndicator(tkwin, display, d, x, y, bgBorder, indicatorColor, Tk_GetColorByValue(tkwin, bg_brdr->bgColorPtr)->pixel; imgColors[1 /*B*/] = Tk_GetColorByValue(tkwin, bg_brdr->bgColorPtr)->pixel; - imgColors[2 /*C*/] = - Tk_GetColorByValue(tkwin, bg_brdr->lightColorPtr)->pixel; + imgColors[2 /*C*/] = (bg_brdr->lightColorPtr != NULL) ? + Tk_GetColorByValue(tkwin, bg_brdr->lightColorPtr)->pixel : + WhitePixelOfScreen(bg_brdr->screen); imgColors[3 /*D*/] = Tk_GetColorByValue(tkwin, selectColor)->pixel; imgColors[4 /*E*/] = Tk_GetColorByValue(tkwin, bg_brdr->darkColorPtr)->pixel; + imgColors[4 /*E*/] = (bg_brdr->darkColorPtr != NULL) ? + Tk_GetColorByValue(tkwin, bg_brdr->darkColorPtr)->pixel : + BlackPixelOfScreen(bg_brdr->screen); imgColors[5 /*F*/] = Tk_GetColorByValue(tkwin, bg_brdr->bgColorPtr)->pixel; imgColors[6 /*G*/] = |