From beb29e5c7ae3651d6200e32b1da5b0670f547aea Mon Sep 17 00:00:00 2001 From: pspjuth Date: Thu, 18 Sep 2003 20:34:07 +0000 Subject: Fixed a small mistake in previous checkin. --- generic/tkGrid.c | 11 ++++++----- tests/grid.test | 8 +++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/generic/tkGrid.c b/generic/tkGrid.c index 9a8ca90..b449b10 100644 --- a/generic/tkGrid.c +++ b/generic/tkGrid.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: tkGrid.c,v 1.28 2003/09/18 18:22:22 pspjuth Exp $ + * RCS: @(#) $Id: tkGrid.c,v 1.29 2003/09/18 20:34:07 pspjuth Exp $ */ #include "tkInt.h" @@ -885,10 +885,11 @@ GridRowColumnConfigureCommand(tkwin, interp, objc, objv) return TCL_ERROR; } ok = CheckSlotData(masterPtr, slot, slotType, /* checkOnly */ 1); - slotPtr = (slotType == COLUMN) ? - masterPtr->masterDataPtr->columnPtr : - masterPtr->masterDataPtr->rowPtr; - + if (ok == TCL_OK) { + slotPtr = (slotType == COLUMN) ? + masterPtr->masterDataPtr->columnPtr : + masterPtr->masterDataPtr->rowPtr; + } /* * Return all of the options for this row or column. If the * request is out of range, return all 0's. diff --git a/tests/grid.test b/tests/grid.test index c751db4..2c13a38 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: grid.test,v 1.21 2003/09/18 18:22:22 pspjuth Exp $ +# RCS: @(#) $Id: grid.test,v 1.22 2003/09/18 20:34:07 pspjuth Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -744,6 +744,12 @@ test grid-10.25 {column/row configure} { } {0 2 1 1 2 2 0 1} grid_reset 10.25 +test grid-10.26 {column/row configure} { + button .b + grid columnconfigure .b 0 +} {-minsize 0 -pad 0 -uniform {} -weight 0} +grid_reset 10.26 + # auto-placement tests test grid-11.1 {default widget placement} { -- cgit v0.12