From b510716c1dd2144cf1cad40b97056c72f4eaaf65 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Wed, 8 Oct 2003 20:49:57 +0000 Subject: [project @ 2003-10-08 20:49:57 by bursa] Fix column width recalculation when objects are loaded. svn path=/import/netsurf/; revision=354 --- render/layout.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'render/layout.c') diff --git a/render/layout.c b/render/layout.c index 7474f2755..ea3ea06b7 100644 --- a/render/layout.c +++ b/render/layout.c @@ -931,10 +931,8 @@ void calculate_table_widths(struct box *table) if (table->max_width != UNKNOWN_MAX_WIDTH) return; - if (table->col) - col = table->col; - else - col = xcalloc(table->columns, sizeof(*col)); + free(table->col); + table->col = col = xcalloc(table->columns, sizeof(*col)); assert(table->children != 0 && table->children->children != 0); @@ -1082,7 +1080,6 @@ void calculate_table_widths(struct box *table) } table->min_width = min_width; table->max_width = max_width; - table->col = col; LOG(("min_width %lu, max_width %lu", min_width, max_width)); } -- cgit v1.2.3