fixed sending null strings to gdk_string_width
This commit is contained in:
@ -2840,9 +2840,18 @@ size_allocate_columns (GtkCList * clist)
|
|||||||
gint width;
|
gint width;
|
||||||
|
|
||||||
if (clist->column[i].width_set)
|
if (clist->column[i].width_set)
|
||||||
|
{
|
||||||
width = clist->column[i].width;
|
width = clist->column[i].width;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
width = gdk_string_width (GTK_WIDGET (clist)->style->font, clist->column[i].title);
|
{
|
||||||
|
if (clist->column[i].title)
|
||||||
|
width = gdk_string_width (GTK_WIDGET (clist)->style->font,
|
||||||
|
clist->column[i].title);
|
||||||
|
else
|
||||||
|
width = 0;
|
||||||
|
}
|
||||||
|
|
||||||
clist->column[i].area.width = MAX (width,
|
clist->column[i].area.width = MAX (width,
|
||||||
clist->clist_window_width -
|
clist->clist_window_width -
|
||||||
xoffset - (2 * (CELL_SPACING + COLUMN_INSET)));
|
xoffset - (2 * (CELL_SPACING + COLUMN_INSET)));
|
||||||
|
Reference in New Issue
Block a user