]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
should handle empty fields now
authorewt <ewt>
Fri, 12 Sep 1997 15:49:37 +0000 (15:49 +0000)
committerewt <ewt>
Fri, 12 Sep 1997 15:49:37 +0000 (15:49 +0000)
grid.c

diff --git a/grid.c b/grid.c
index d5e654cbae5a516282d4b67fbfe0a71c52e4a95e..96541a5899efa577410db2f2a431786eebd2d87a 100644 (file)
--- a/grid.c
+++ b/grid.c
@@ -100,9 +100,10 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) {
                if (field->u.grid->width == -1) 
                    shuffleGrid(field->u.grid, left, top, 0);
                j = field->u.grid->width;
-           } else {
+           } else if (field->type == NEWT_GRID_COMPONENT){
                j = field->u.co->width;
-           }
+           } else 
+               j = 0;
 
            j += field->padLeft + field->padRight;
 
@@ -123,9 +124,10 @@ static void shuffleGrid(newtGrid grid, int left, int top, int set) {
                if (field->u.grid->height == -1) 
                    shuffleGrid(field->u.grid, 0, 0, 0);
                j = field->u.grid->height;
-           } else {
+           } else if (field->type == NEWT_GRID_COMPONENT){
                j = field->u.co->height;
-           }
+           } else 
+               j = 0;
 
            j += field->padTop + field->padBottom;