commit 5644514e90f485db6415c5ed173cc8d554a09d9d
Author: Thomas Mittelstaedt <tmstaedt@t-mittelstaedt.de>
Date:   Sun Aug 29 08:18:29 2010 +0200

    Return early, if layout is NULL

diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 60624a5..19de69a 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -218,6 +218,7 @@ static void update_im_cursor_location (ECellTextView *tv);
 gchar *
 e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
 {
+	g_return_val_if_fail(ECT_CLASS(cell) != NULL, NULL);
 	if (ECT_CLASS(cell)->get_text)
 		return ECT_CLASS(cell)->get_text (cell, model, col, row);
 	else
@@ -227,6 +228,7 @@ e_cell_text_get_text (ECellText *cell, ETableModel *model, gint col, gint row)
 void
 e_cell_text_free_text (ECellText *cell, gchar *text)
 {
+	g_return_val_if_fail(ECT_CLASS(cell) != NULL, NULL);
 	if (ECT_CLASS(cell)->free_text)
 		ECT_CLASS(cell)->free_text (cell, text);
 }
@@ -566,6 +568,7 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width)
 	cairo_font_options_t *font_options;
 
 	layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas), text);
+	g_return_val_if_fail(layout != NULL, NULL);
 
 	attrs = (PangoAttrList *) build_attr_list (text_view, row, text ? strlen (text) : 0);
 
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 9647044..eebba03 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -1063,6 +1063,8 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
 			for ( list = etgc->children; list; list = g_list_next (list)) {
 				ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
 				ETableGroup *child = child_node->child;
+				GnomeCanvasItem *item;
+				
 				g_object_get (child,
 					      "height", &item_height,
 					      NULL);
@@ -1075,12 +1077,15 @@ etgc_reflow (GnomeCanvasItem *item, gint flags)
 							    GROUP_INDENT,
 							    running_height);
 
-				gnome_canvas_item_set (GNOME_CANVAS_ITEM(child_node->rect),
-						      "x1", (double) 0,
-						      "x2", (double) running_width + GROUP_INDENT,
-						      "y1", (double) running_height - extra_height,
-						      "y2", (double) running_height + item_height,
-						      NULL);
+				item = GNOME_CANVAS_ITEM(child_node->rect);
+				if (item->canvas) {
+          gnome_canvas_item_set (item,
+                                 "x1", (double) 0,
+                                 "x2", (double) running_width + GROUP_INDENT,
+                                 "y1", (double) running_height - extra_height,
+                                 "y2", (double) running_height + item_height,
+                                 NULL);
+        }
 
 				running_height += item_height + extra_height;
 			}
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index dfe2eb2..8280073 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1851,6 +1851,9 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid
 	x1 = x2 = floor (eti_base.x);
 	for (col = 0; col < cols; col++, x1 = x2) {
 		ETableCol *ecol = e_table_header_get_column (eti->header, col);
+                if (ecol == NULL) {
+			continue;
+                }
 
 		x2 = x1 + ecol->width;
 
