summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2015-02-06 14:09:24 (GMT)
committerdgp@users.sourceforge.net <dgp>2015-02-06 14:09:24 (GMT)
commit890fcb88d75ba32a07de9179a40631d6a2209dd7 (patch)
tree1da4a8a6489d78349ebd449fe04ce74cf116778f
parent3c8d6e1922e6f9246a211353563147c05b7afc6c (diff)
downloadtk-890fcb88d75ba32a07de9179a40631d6a2209dd7.zip
tk-890fcb88d75ba32a07de9179a40631d6a2209dd7.tar.gz
tk-890fcb88d75ba32a07de9179a40631d6a2209dd7.tar.bz2
[a6c2807c13] Don't let forgotten slave trick us into layout computations
outside the layout grid.
-rw-r--r--generic/tkGrid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkGrid.c b/generic/tkGrid.c
index c6a00d5..ccdde19 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -1991,7 +1991,7 @@ ResolveConstraints(
if (slavePtr->numCols > 1) {
slavePtr->binNextPtr = layoutPtr[rightEdge].binNextPtr;
layoutPtr[rightEdge].binNextPtr = slavePtr;
- } else {
+ } else if (rightEdge >= 0) {
int size = slavePtr->size + layoutPtr[rightEdge].pad;
if (size > layoutPtr[rightEdge].minSize) {
@@ -2010,7 +2010,7 @@ ResolveConstraints(
if (slavePtr->numRows > 1) {
slavePtr->binNextPtr = layoutPtr[rightEdge].binNextPtr;
layoutPtr[rightEdge].binNextPtr = slavePtr;
- } else {
+ } else if (rightEdge >= 0) {
int size = slavePtr->size + layoutPtr[rightEdge].pad;
if (size > layoutPtr[rightEdge].minSize) {