From b78286eab5d9872527c956d328abc38e8b5a94b9 Mon Sep 17 00:00:00 2001 From: Jay Painter Date: Mon, 23 Mar 1998 01:08:03 +0000 Subject: [PATCH] fixed sending null strings to gdk_string_width --- gtk/gtkclist.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 9392948b6..bc4ddeb8d 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -2840,9 +2840,18 @@ size_allocate_columns (GtkCList * clist) gint width; if (clist->column[i].width_set) - width = clist->column[i].width; + { + width = clist->column[i].width; + } 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->clist_window_width - xoffset - (2 * (CELL_SPACING + COLUMN_INSET)));