summaryrefslogtreecommitdiffstats
path: root/generic/tkGrid.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-06 14:10:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-06 14:10:46 (GMT)
commitb84313bdb7b4e075d46e628a9ba72067874a7fd2 (patch)
tree5a03fd46f869d71887bec9445df9d662721e3028 /generic/tkGrid.c
parente0ecd953d9aa6ea42e63975399664256424f9bdb (diff)
parentd0a04da15e64d7bcf8fcec65ceae7c721c8c4ad2 (diff)
downloadtk-b84313bdb7b4e075d46e628a9ba72067874a7fd2.zip
tk-b84313bdb7b4e075d46e628a9ba72067874a7fd2.tar.gz
tk-b84313bdb7b4e075d46e628a9ba72067874a7fd2.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 3e40875..2a88b76 100644
--- a/generic/tkGrid.c
+++ b/generic/tkGrid.c
@@ -2018,7 +2018,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) {
@@ -2037,7 +2037,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) {