Add sanity check to avoid X-errors.

SVN revision: 37521
This commit is contained in:
Kim Woelders 2008-11-05 22:56:14 +00:00
parent fc003029c7
commit 94baac20f7
1 changed files with 3 additions and 0 deletions

View File

@ -1282,6 +1282,8 @@ DialogRealizeItem(Dialog * d, DItem * di)
dii->w = sw - (dii->padding.left + dii->padding.right);
if (dii->fill_v)
dii->h = sh - (dii->padding.top + dii->padding.bottom);
if (dii->w <= 0 || dii->h <= 0)
goto skip;
if (dii->type == DITEM_TABLE)
{
int dx, dy, newx, newy;
@ -1384,6 +1386,7 @@ DialogRealizeItem(Dialog * d, DItem * di)
dii->item.slider.numeric_h);
}
}
skip:
x += sw;
c += dii->col_span;
if (c >= cols)