summaryrefslogtreecommitdiffstats
path: root/generic/tkGrid.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-06 14:09:24 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-06 14:09:24 (GMT)
commit6ea7663596de2decf2c756e237af905a62d1a0ef (patch)
tree7f86a6d391842cfb9647dca6dbb747e6f7690c3d /generic/tkGrid.c
parentf96678775487e7697f21855b5032f0d496493c78 (diff)
downloadtk-6ea7663596de2decf2c756e237af905a62d1a0ef.zip
tk-6ea7663596de2decf2c756e237af905a62d1a0ef.tar.gz
tk-6ea7663596de2decf2c756e237af905a62d1a0ef.tar.bz2
[a6c2807c13] Don't let forgotten slave trick us into layout computations
outside the layout grid.
Diffstat (limited to 'generic/tkGrid.c')
-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) {